online compiler and debugger for c/c++

code. compile. run. debug. share.
Source Code   
Language
// 2a.cpp #include <iostream> #include <iomanip> using namespace std; void criba(int * p, int n); int main() { int numeros[2019]; for (int j = 0; j < 2019; ++j) numeros[j] = j + 2; criba(numeros, 2020); } void criba(int * p, int n) { for (int j = 2; j*j <= n; ++j) { if (p[j-2] > 0) { for (int k = 0; j*j + k*j <= n; ++k) p[j*j + k*j - 2] = 0; } } for (int j = 2; j <= n; ++j) { if (p[j-2] > 0) { cout << setw(6) << j << " esta en la posicion " << p+j-2 << endl; } } }

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