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#, OCaml, VB, Swift, Pascal, Fortran, Haskell, Objective-C, Assembly, HTML, CSS, JS, SQLite, Prolog. Code, Compile, Run and Debug online from anywhere in world. *******************************************************************************/ class JuegosApp{ public static void main(String[] args){ int i; Juegos j = new Juegos(); int alzs[] = new int[2]; // números de cada juego System.out.println("Juego para combatir el alzeimer: 2 amigos A1 y A2 cuentan 1, 2, 3 en modo alternativo"); System.out.println("N. A1 A2"); for(i = 1; i<=6; i++){ alzs = j.alzeimer(); System.out.println(i + " " + alzs[0] + " " + alzs[1] ); } System.out.println("Felicitaciones a los jugadores"); //--------------------------- String [] nombres = {"Mía ", "Fiore ", "Empate"}; // valores que se pueden leer: Parametrización int[] nom = new int[3]; // índices de nombres String [] pipati = {"Piedra", "Papel ", "Tijera"}; // valores que se pueden leer: Parametrización int[] ppt = new int[3]; // índices de pipati System.out.println("\nJuego Piedra Papel y Tijera"); System.out.printf("N. %s %s Ganador\n", nombres[0], nombres[1]); for(i = 1; i<=6; i++){ ppt = j.piPaTi(); System.out.printf("%d %s %s %s\n", i, pipati[ppt[0]], pipati[ppt[1]], nombres[ppt[2]]); nom[ppt[2]]++; } if(nom[0]==nom[1]) System.out.printf("Felicitaciones a los jugadores por el empate\n"); else System.out.printf("Felicitaciones al ganador: %6s\n", nombres[(nom[0]>nom[1])? 0:1]); } } class Juegos{ static int alz=0; // variable de rotación de alzeimer int [] alzs = new int[2]; // números de alzeimer int[] alzeimer(){ // juego de Alzeimer alzs[0] = alz++%3+1; alzs[1] = alz++%3+1; return alzs; } // ------------------------------------ int [] ppt = new int[3]; // ppt[0] y ppt[1]: índices 0, 1 o 2: (Piedra, Papel o Tijera) de pipati[] // ppt[2]: índice 0, 1 o 2: (Mia, Fiore o Ganador) de nombres[] int[] piPaTi(){ // juego de Piedra Papel y Tijera: calcula ppt0, ppt1 y ppt2 ppt[0] = (int)(Math.random()*3); ppt[1] = (int)(Math.random()*3); if(ppt[0]==ppt[1]) ppt[2] = 2; else { if((ppt[0]+1)%3 == ppt[1]) ppt[2] = 1; else ppt[2] = 0; } return ppt; } }

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