online compiler and debugger for c/c++

code. compile. run. debug. share.
Source Code   
Language
#include <stdio.h> void main() { int n,i; long sum=0; long int t=1; printf("Input the number of terms : "); scanf("%d",&n); for(i=1;i<=n;i++) { printf("%ld ",t); if (i<n) { printf("+ "); } sum=sum+t; t=(t*10)+1; } printf("\nThe Sum is : %ld\n",sum); }

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