online compiler and debugger for c/c++

code. compile. run. debug. share.
Source Code   
Language
#include <iostream> #include <string> int main() { std::string input; //take input from user std::getline(std::cin, input); //check if the 5th letter(at index 4 since indexing starts with 0) is 1 or 2 if(input.at(4) == '1') { std::cout<< "zadochno"<<std::endl; } else if(input.at(4) == '2') { std::cout << "redovno"<<std::endl; } for(int i = 0; i < input.size(); ++i) { //check if the all the characters are digits of a number if(std::isdigit(input[i])) { ;//std::cout<<"yes digit"; } else { std::cout<<"Please enter a valid number"<<std::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