online compiler and debugger for c/c++

code. compile. run. debug. share.
Source Code    Language
/* 1.- Crear un programa que pida datos al usuario. los datos de una matriz de 2×2 y muestra su traspuesta (el resultado de intercambiar filas por columnas). */ #include<iostream> using namespace std; int main(){ //-------------------------------------VARIABLES-------------------------------------------- int matriz[2][2]; //-----------------------------------OPERACIONES------------------------------------------- cout<<"\t Ingreso de matriz 2x2 "<<endl<<endl; for(int i=0; i<=1; i++) { for(int j=0; j<=1; j++){ cout<<"\t Ingresar valor ["<<i<<"] "<<"["<<j<<"]: "; cin>>matriz[i][j]; } cout<<endl; } cout<<"\t Matriz Original: "<<endl; for(int i=0; i<=1; i++) { for(int j=0; j<=1; j++){ cout<<"\t "<<matriz[i][j]<<" "; } cout<<endl; } cout<<endl<<endl; //------------------------------------RESULTADO-------------------------------------------- cout<<"\t Matriz Transpuesta: "<<endl; for(int i=0; i<=1; i++) { for(int j=0; j<=1; j++){ cout<<"\t "<<matriz[j][i]<<" "; } 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