online compiler and debugger for c/c++

code. compile. run. debug. share.
Source Code   
Language
#include <stdio.h> void main() { int i,n; float s=0.0; printf("Input the number of terms : "); scanf("%d",&n); printf("\n\n"); for(i=1;i<=n;i++) { if(i<n) { printf("1/%d + ",i); s+=1/(float)i; } if(i==n) { printf("1/%d ",i); s+=1/(float)i; } } printf("\nSum of Series upto %d terms : %f \n",n,s); }

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