online compiler and debugger for c/c++

code. compile. run. debug. share.
Source Code   
Language
#include <iostream> #include<algorithm> #include<vector> using namespace std; int main(){ string str; getline(cin, str); vector<int> vec; for(int i=0; i<str.length(); i++){ if(isdigit(str[i])){ vec.push_back(str[i] - '0'); } } int max = *max_element(vec.begin(), vec.end()); if(max%2==0){ cout << max << " is even"; } else { cout <<max<< " is odd"; } 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