online compiler and debugger for c/c++

code. compile. run. debug. share.
Source Code    Language
import java.util.*; //import java.util.stream.*; public class Main { public static void printLine(int x[]) { for (int i=0; i<x.length; i++) System.out.print(x[i]+" "); System.out.println(); } public static void main(String[] args) { Scanner inp = new Scanner(System.in); int n,k; //System.out.print("n="); n=inp.nextInt(); //System.out.print("k="); k=inp.nextInt(); int x[] = new int[n]; for (int i=0; i<n; i++) x[i]=1; int p; while (true) { printLine(x); p=0; while (true) { if (x[p]<k) { x[p]++; break; } else { x[p]=1; p++; if (p>=n) break; } } if (p>=n) break; } } }

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