online compiler and debugger for c/c++

code. compile. run. debug. share.
Source Code   
Language
#include <iostream> using namespace std; int main() { int n,r,i; cout << "n="; cin >> n; cout << "r="; cin >> r; int x[n]={0}; while(1) { for (i=0; i<n; i++) cout << x[i] << " "; cout << endl; i=0; while (1) { if (x[i]<r-1) { x[i]++; break; } x[i++]=0; if (i>=n) break; } if (i>=n) break; } 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