online compiler and debugger for c/c++

code. compile. run. debug. share.
Source Code    Language
#include <iostream> using namespace std ; const int Nmax = 1000 ; int main() { int N , i ; int MEMproc[Nmax] ; bool COMPLETATI ; cout<<"\n INSERIRE IL NUMERO DI PROCESSI DA SIMULARE"<<endl ; cout<<" " ; cin>>N ; i = 0 ; while ( i < N ) { i ++ ; cout<<" Numero di MB del programma "<<i<<": \t" ; cin>>MEMproc[i-1] ; } COMPLETATI = false ; while ( ! COMPLETATI ) { COMPLETATI = true ; cout<<"\n TURNO DI ESECUZIONE..."<<endl ; for ( i = 0 ; i < N ; i ++ ) { if ( MEMproc[i] > 0 ) { MEMproc[i] -= 10 ; cout<<" Processo "<<(i+1)<<"\tslice eseguita\trestano "<<MEMproc[i]<<"MB" ; if ( MEMproc[i] > 0 ) { cout<<endl; COMPLETATI = false ; } else { cout<<"\t TERMINATO"<<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