online compiler and debugger for c/c++

code. compile. run. debug. share.
Source Code   
Language
/****************************************************************************** Welcome to GDB Online. GDB online is an online compiler and debugger tool for C, C++, Python, PHP, Ruby, C#, OCaml, VB, Perl, Swift, Prolog, Javascript, Pascal, COBOL, HTML, CSS, JS Code, Compile, Run and Debug online from anywhere in world. *******************************************************************************/ //Matrices /* Un programa que pida al usuario los datos de dos matrices de 2×2, y calcule y muestre su producto. */ #include<iostream> #include<locale.h> #include<conio.h> int main(){ setlocale(LC_CTYPE, "Spanish"); int elec = 0; double mz[2][2] = {}, mz1[2][2] = {}, mzr[2][2] = {}; std::cout<<"PRODUCTO ENTRE MATRICES"<<std::endl<<std::endl<<"Ubicación de datos"<<std::endl<<"|[0][0] [0][1]|"<<std::endl<<"|[0][1] [1][1]|"<<std::endl<<std::endl; std::cout<<"Ingreso de datos de la primera matriz"<<std::endl; for(int i = 0; i<=1; i++){ for(int j = 0; j<=1; j++){ std::cout<<"["<<i<<"] ["<<j<<"] = "; std::cin>>mz[i][j]; } } std::cout<<std::endl<<"Ingreso de datos de la segunda matriz"<<std::endl; for(int i = 0; i<=1; i++){ for(int j = 0; j<=1; j++){ std::cout<<"["<<i<<"] ["<<j<<"] = "; std::cin>>mz1[i][j]; } } std::cout<<std::endl<<"-Matriz N°1"<<std::endl; for(int i = 0; i<=1; i++){ std::cout<<"| "; for(int j = 0; j<=1; j++){ std::cout<<mz[i][j]<<" | "; } std::cout<<std::endl; } std::cout<<std::endl<<"-Matriz N°2"<<std::endl; for(int i = 0; i<=1; i++){ std::cout<<"| "; for(int j = 0; j<=1; j++){ std::cout<<mz1[i][j]<<" | "; } std::cout<<std::endl; } for(int i = 0; i<=1; i++){ for(int j = 0; j<=1; j++){ for(int k = 0; k<=1; k++){ mzr[i][j] += (mz[i][k]*mz1[k][j]); } } } std::cout<<std::endl<<"-Matriz producto"<<std::endl; for(int i = 0; i<=1; i++){ std::cout<<"| "; for(int j = 0; j<=1; j++){ std::cout<<mzr[i][j]<<" | "; } std::cout<<std::endl; } do{ std::cout<<std::endl<<"Volver a ingresar matrices[1] // Salir del programa[2]"<<std::endl<<"Opción = "; std::cin>>elec; if(elec == 1){ std::cout<<std::endl; return main(); } else if(elec>2 || elec<=0){ std::cout<<std::endl<<"-----ERROR: Solo puede ingresar el 1 o el 2-----"<<std::endl; } else{ std::cout<<std::endl<<"Gracias por usar este programa :D"; getch(); return 0; } }while(elec>2 || elec <=0); getch(); 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