online compiler and debugger for c/c++

code. compile. run. debug. share.
Source Code   
Language
#include <iostream> using namespace std; int prost(int n, int i) { if (n < 2) { return false; } else if (n == 2) { return true; } else if (n % i == 0) { return false; } else if (i < n / 2) { return prost(n, i + 1); } else { return true; } } int main() { int n; bool k; cout<<"Введите число: "; cin>>n; k=prost(n,2); if (k==true) cout <<"Простое"<<endl; else cout <<"Составное"<<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