online compiler and debugger for c/c++

code. compile. run. debug. share.
Source Code    Language
/****************************************************************************** https://ticoprof.wordpress.com/2016/04/26/esercizi-con-gli-array/ es 15 Leggere un array di interi di 10 posizioni e dire se in tutte le posizoni pari dell’array è memorizzato un numero pari. *******************************************************************************/ #include <iostream> using namespace std; int main () { int a[10]; bool condizione=true; //leggo l'array cout<<"inserire 10 valori dell'array"<<endl; for (int i = 0; i < 10; i++) { cin >> a[i]; } //verifico la condizione for(int i=0;i<9;i++) { if(i%2==0) { if(a[i]%2!=0){condizione=false;} } } if(condizione){cout<<"condizione rispettata";} else{cout<<"condizione NON rispettata";} 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