online compiler and debugger for c/c++

code. compile. run. debug. share.
Source Code   
Language
/* Preg 1[ 4/6] Se pide generar UNA UNICA VEZ y luego hacer una nueva distribucion con la restriccion pedida */ #include <iostream> #include <cstdlib> #include <time.h> #define L 20 using namespace std; int main(){ srand(time(NULL)); int A[L]; int j, suma1=0, suma2=0; cout<<"Vector: "<<endl; do{ cout<<"\n"; for (j=0; j<L; j++) { A[j] = rand(); cout << A[j] << " "; } for (j=0; j<9; j++) { suma1 = suma1 + A[j]; } for (j=10; j<19; j++) { suma2 = suma2 + A[j]; } cout <<"\n"<<"La suma de los 10 primeros es: "<< suma1 << " "; cout <<"\n"<<"La suma de los 10 ultimos es: "<< suma2 << "\n"; }while(suma1<suma2); 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