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, Java, PHP, Ruby, Perl, C#, VB, Swift, Pascal, Fortran, Haskell, Objective-C, Assembly, HTML, CSS, JS, SQLite, Prolog. Code, Compile, Run and Debug online from anywhere in world. *******************************************************************************/ import java.util.Scanner; public class Main { public static void main(String[] args) { Scanner inp = new Scanner(System.in); int prime[] = new int[999999]; int factor=1,n=1,up=1,ind=1,m=1; double sum=1,product=1; prime[0]=2; System.out.print("Find all primes below: "); int upper=inp.nextInt(); System.out.print("Zeta Function Input: "); double s=inp.nextDouble(); for(up=3;up<upper;up++){ factor=0; for (ind=0;prime[ind]<=Math.pow(up,.5);ind++){ if (up%prime[ind]==0){ factor++; break; } } if (factor==0){ prime[n++]=up; } } for(m=0;m<n;m++){ System.out.println(m+1+", "+prime[m]); product*=1/(1-Math.pow(prime[m],-s)); } System.out.println("Number of Primes: "+n); System.out.println("Zeta Function Euler Product: "+product); } }

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