online compiler and debugger for c/c++

code. compile. run. debug. share.
Source Code    Language
/****************************************************************************** Online C++ Compiler. Code, Compile, Run and Debug C++ program online. Write your code in this editor and press "Run" button to compile and execute it. *******************************************************************************/ #include <iostream> #include <limits> using namespace std; int main() { ////////////////////////////////////////////////////////////////////// { //unsigned unsigned int a_troj; while (!(cin >> a_troj) || a_troj < 0) { if (cin.fail()) { cout << " To nie jest liczba !!!" << endl; cin.clear(); cin.ignore(numeric_limits < streamsize > ::max(), '\n'); } cout << " Wprowadz poprawne dane: " << endl; } cout << "Nie poprawne działanie programu dla ujemnych wartości bo unsigned \n \ Dla ujemnych wartości wejścia, przerwało działanie pętli" << endl; } /////////////////////////////////////////////////////////////////////////// { //unsigned int a_troj; while (!(cin >> a_troj) || a_troj < 0) { if (cin.fail()) { cout << " To nie jest liczba !!!" << endl; cin.clear(); cin.ignore(numeric_limits < streamsize > ::max(), '\n'); } cout << " Wprowadz poprawne dane: " << endl; } cout << "Poprawne działanie programu bo int \n \ pętla działa dla ujemnych wartości" << endl; } return 0; } //https://en.cppreference.com/w/cpp/io/basic_istream/ignore

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