online compiler and debugger for c/c++

code. compile. run. debug. share.
Source Code    Language
#include <iostream> #include <iomanip> #include <cstdlib> #include <ctime> using namespace std; int main() { srand(time(nullptr)); unsigned int min, max; min = max = rand() % 99; cout << "Iteracja cwiczenia\n\n" << "Wartosci poczatkowe\n" << "min = " << min << "\n" << "max = " << max << "\n" << endl; for (unsigned int i = 0; i < 5; i++) { unsigned int random_number = rand() % 99; if (min > random_number) min = random_number; if (max < random_number) max = random_number; cout << (i + 1) << ". wylosowana liczba to " << setw(2) << random_number << "\n"; } cout << endl; float average = static_cast<float>(min + max) / 2; cout << "Wartosci koncowe - podsumowanie\n" << "min = " << min << "\n" << "max = " << max << "\n" << "Srednia: " << fixed << setprecision(1) << average << endl; 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