online compiler and debugger for c/c++

code. compile. run. debug. share.
Source Code    Language
#include <iostream> #include <iomanip> #include <conio.h> #include <random> using namespace std; int main() { float a; int d, b, c, min, max; cout << "Iteracja cwiczenia\n\n"; srand(time(nullptr)); min = max = rand() % 99; cout << "Wartosci zmiennych przed petla\n" << "min = " << min << "\n" << "max = " << max << "\n" << "c = " << c << "\n" << "d = " << d << "\n" << endl; for (int i = 1; i <5; i++) { d = c = rand() % 99; cout << "Dla i = " << i << "\n" << "Przed if\n" << "c = " << c << ", d = " << d << "\n" << "min = " << min << ", max = " << max << "\n\n"; if (min > c) c = min; if (max < d) d = max; cout << "Po if\n" << "c = " << c << ", d = " << d << "\n" << "min = " << min << ", max = " << max << "\n" << endl; } a = (min + max) / 2; cout << "Wartosci zmiennych po petli\n" << "min = " << min << "\n" << "max = " << max << "\n" << "c = " << c << "\n" << "Srednia: "<< fixed << setprecision(2) << a << endl; //system("pause"); return 0; }

Compiling Program...

Command line arguments:
Standard Input: Interactive Console Text
×

                

                

Program is not being debugged. Click "Debug" button to start program in debug mode.

#FunctionFile:Line
VariableValue
RegisterValue
ExpressionValue