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. *******************************************************************************/ #include <stdio.h> int digitCount(int i){ int count=0; while(i!=0) { count++; i=i/10; } return count; } int power(int y, int count){ if(count>0) return power(y,count-1)*y; else return 1; } int armstrongNumber(int i){ int count=digitCount(i); int sum=0; while(i!=0){ int y=i%10; int res=power(y,count); sum=sum+res; i=i/10; } return sum; } //void suming(int answer){ // int arr[count]; //} /*int RangeCount(int n,int m){ int i,j; int count=0; for(i=n; i<m; i++){ int answer=armstrongNumber(i); if(answer==i){ count++; }} return count; }*/ void RangeAnswer(int n,int m){ int i,j; int count=0; for(i=n; i<m; i++){ int answer=armstrongNumber(i); if(answer==i){ count++; printf("%d\n",count); int arr[count]; arr[count]=answer; // return answer; } }} int main() { int n,m; scanf("%d%d",&n,&m); //int total= RangeCount(n,m); //int final= RangeAnswer(n,m); //int arr[]={final}; //int size = sizeof arr / sizeof *arr; //int sum=arr[length]; //printf("%d",final); 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