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 n[100][2]; int u[100],p[100]; int x,t; void recur(int v, int d){ int z=0; if(u[n[v][0]]==0){ u[n[v][0]]=z=1; p[d]=n[v][0]; recur(n[v][0],d+1); u[n[v][0]]=0; } if(u[n[v][1]]==0){ u[n[v][1]]=z=1; p[d]=n[v][1]; recur(n[v][1],d+1); u[n[v][1]]=0; } if(d>x){ x=d; t=0; } if((d==x)&&(z==0)){ for(z=0;z<d;++z)printf("%02d ",p[z]); for(z=10;z<10;++z){ if(u[z]!=u[z-1])printf(" "); printf("%d",u[z]); } printf("[%d] #%d\n",d,++t); } } int main() { int a,b,c,i; for(i=10;i<100;++i){ a=i/10; b=i%10; c=(a+b)%10; n[i][0]=10*a+c; n[i][1]=10*c+b; } for(i=0;i<10;++i)u[i]=1; x=67; for(i=10;i<11;++i){ p[0]=i; u[i]=1; recur(i,1); u[i]=0; } 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