online compiler and debugger for c/c++

code. compile. run. debug. share.
Source Code   
Language
/****************************************************************************** Welcome to GDB Online. GDB online is an online compiler and debugger tool for C, C++, Python, PHP, Ruby, C#, VB, Perl, Swift, Prolog, Javascript, Pascal, HTML, CSS, JS Code, Compile, Run and Debug online from anywhere in world. *******************************************************************************/ #include <iostream> #include <bits/stdc++.h> using namespace std; #define ll unsigned long long void primeSieve(int *p) { for (int i = 3; i <= 100000; i += 2) { p[i] = 1; } // cout << in for (int i = 3; i <= 100000; i += 2) { if (p[i] == 1) { for (ll j = i * i; i <= 100000; j = j + i) { p[j] = 0; } } } p[2] = 1; p[0] = p[1] = 0; } int main() { int n; cin >> n; int p[100005] = {0}; primeSieve(p); for (ll i = 0; i <= n; i++) { if (p[i] == 1) { cout << i << " "; } } 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