online compiler and debugger for c/c++

code. compile. run. debug. share.
Source Code    Language
#include <stdio.h> #include <math.h> int main(void) { int max = 50; int current = 4; int checker = 2; do{ if(checker > sqrt((double)current)) { checker = 2; // number is prime print it printf("%d is prime\n",current); current++; } else if(current % checker == 0) { /* number is not a prime, let's continue */ checker = 2; current++; } else checker++; }while(current < max); }

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