online compiler and debugger for c/c++

code. compile. run. debug. share.
Source Code   
Language
#include <iostream> using namespace std; int main() { int mc[10][10], n, i, j; cout<<"dimensiunea? "; cin>>n; for(i=1; i<=n; i++) for(j=1; j<=n; j++) mc[i][j]=i*10+j; cout<<endl<<endl; cout<<"matricea:"<<endl<<endl; for(i=1; i<=n; i++){ for(j=1; j<=n; j++) cout<<mc[i][j]<<" "; cout<<endl; } cout<<endl<<endl; cout<<"peste diag. princ.: "; cout<<endl<<endl; for(i=1; i<=n; i++){ for(j=1; j<=n; j++) if(i<j) cout<<mc[i][j]<<" "; else cout<<" "; cout<<endl; } cout<<endl<<endl; cout<<"sub diag. princ.: "; cout<<endl; for(i=1; i<=n; i++){ for(j=1; j<=n; j++) if(i>j) cout<<mc[i][j]<<" "; else cout<<" "; cout<<endl; } cout<<endl<<endl; cout<<"peste diag. sec.: "; cout<<endl<<endl; for(i=1; i<=n; i++){ for(j=1; j<=n; j++) if(i+j<n+1) cout<<mc[i][j]<<" "; else cout<<" "; cout<<endl; } cout<<endl<<endl; cout<<"sub diag. sec.: "; cout<<endl<<endl; for(i=1; i<=n; i++){ for(j=1; j<=n; j++) if(i+j>n+1) cout<<mc[i][j]<<" "; else cout<<" "; cout<<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