online compiler and debugger for c/c++

code. compile. run. debug. share.
Source Code   
Language
#include<iostream> #include<cstdlib> #include <ctime> #define EQUIPOS 8 #define POSTAS 4 void ordenar(int **peq, int orden){ int i, j,*tem; for(i=0; i<EQUIPOS-1; i++) for(j=i+1; j<EQUIPOS; j++) if(peq[i][orden] > peq[j][orden]){ tem = peq[i]; peq[i] = peq[j]; peq[j] = tem; } } int main(){ int eq[EQUIPOS][POSTAS+2], *peq[EQUIPOS]; int i=0, j, n = POSTAS+1; srand(time(NULL)); // Carrera for(; i<EQUIPOS; i++){ peq[i] = eq[i]; eq[i][0] = i+1; eq[i][n] = 0; for(j=1; j<=POSTAS;) eq[i][n] += eq[i][j++] = rand()%4+10; } // Reportar ordenar(peq, POSTAS+1); printf("\tBienvenidos a la carrera de %d postas\n", POSTAS); printf("Equipo Tiempos ordenados por TOTAL\n"); printf("\tPosta 1\tPosta 2\tPosta 3\tPosta 4\tTOTAL\n"); for(i=0; i<EQUIPOS; i++) printf(" %2d %2d %2d %2d %2d %2d\n", *peq[i], peq[i][1], peq[i][2], peq[i][3], peq[i][4], peq[i][5]); printf("Felicitaciones al equipo %d ganador de la carrera.\n", *peq[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