online compiler and debugger for c/c++

code. compile. run. debug. share.
Source Code    Language
#include <iostream> #include <set> using namespace std; bool checkDigits( int number ) { auto s_number = to_string( number ); set<char> result( begin(s_number) , end(s_number) ); return result.size() <= 2; } int main() { int foo [] = { 11, 111, 22, 222, 55, 555, 88, 999, 112, 121, 221, 12, 1, 2, 123, 456 }; for( int i=0 ; i<16 ; ++i ) if( checkDigits(foo[i]) ) cout << foo[i] << " "; }

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