online compiler and debugger for c/c++

code. compile. run. debug. share.
Source Code   
Language
#include <iostream> #include <cstdlib> //srand(), rand(), RAND_MAX #include <ctime> //time() using namespace std; #define n 20 int main() { srand(time(NULL)); int barra[n]; int may[3]; int m=n; int max, maxid1=0, maxid2, maxid3, maxf=n, aux=0; int primerMayor = 0, segundoMayor = 0, temp = 0; for(int i=0; i<n; i++) barra[i] = 1+rand()%20; for(int i=0; i<n; i++) cout<<barra[i]<<" "; max=barra[0]; for(int k=0; k<n; k++){ if (barra[k] > primerMayor) primerMayor = item; if (temp < primerMayor) segundoMayor = temp; /*if(barra[k] >= max){ max = barra[k]; maxid1 = k; }*/ } int[] miArray = { 0, 1, 2, 3, 5, 5, 5, 7, 7, 7 }; foreach (int item in miArray) { temp = primerMayor; } /* while(m>17){ //ASIGNAMOS UN VALOR ALEATORIO de entre [a, k] A "b" b = (rand()%(k-a+1)+a); may[20-m] = barra[b]; aux = cartas[m]; cartas[m] = cartas[b]; cartas[b] = aux; cout<<mano[52-k]<<" "<<endl; m--; }*/ /*for(int i=0; i<= tamano; i++){ for(int j=tamano-1; j>=i+1; j--){ if(arreglo[j] < arreglo[j-1]){ //intercambiar posiciones temp=arreglo[j]; arreglo[j]=arreglo[j-1]; arreglo[j-1]=temp; } } }*/ cout<<endl<<"Máximo es matriz["<<maxid1<<"]: "<<max<<endl; 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