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, Java, PHP, Ruby, Perl, C#, OCaml, VB, Swift, Pascal, Fortran, Haskell, Objective-C, Assembly, HTML, CSS, JS, SQLite, Prolog. Code, Compile, Run and Debug online from anywhere in world. *******************************************************************************/ //PROYECTO 2. TABLA DE MULTIPLICAR #include <iostream> #include <conio.h> #include <stdlib.h> using namespace std; int main(){ //DECLARACIÓN DE VARIABLES int tabla, limite; char respuesta; //CICLOS do{ //ENTRADA DE DATOS system("cls"); cout<<"_____________________________________________________________________________"<<endl; cout<<"\n1. TABLA 1"<<endl; cout<<"2. TABLA 2"<<endl; cout<<"3. TABLA 3"<<endl; cout<<"4. TABLA 4"<<endl; cout<<"5. TABLA 5"<<endl; cout<<"6. TABLA 6"<<endl; cout<<"7. TABLA 7"<<endl; cout<<"8. TABLA 8"<<endl; cout<<"9. TABLA 9"<<endl; cout<<"10. TABLA 10"<<endl; cout<<"_____________________________________________________________________________"<<endl; cout<<"\nSeleccione la tabla de multiplicar que desea: "; cin>>tabla; cout<<"\nDigite el numero limite que se va a mostrar en la tabla: "; cin>>limite; cout<<endl; //PROCESOS if(tabla > 0 && tabla <=10){ if(limite > 0){ if(tabla == 1){ for (int i=1; i<=limite; i++){ cout<<tabla<<" x "<<i<<" = "<<(tabla*i)<<endl; } } if(tabla == 2){ for (int i=1; i<=limite; i++){ cout<<tabla<<" x "<<i<<" = "<<(tabla*i)<<endl; } } if(tabla == 3){ for (int i=1; i<=limite; i++){ cout<<tabla<<" x "<<i<<" = "<<(tabla*i)<<endl; } } if(tabla == 4){ for (int i=1; i<=limite; i++){ cout<<tabla<<" x "<<i<<" = "<<(tabla*i)<<endl; } } if(tabla == 5){ for (int i=1; i<=limite; i++){ cout<<tabla<<" x "<<i<<" = "<<(tabla*i)<<endl; } } if(tabla == 6){ for (int i=1; i<=limite; i++){ cout<<tabla<<" x "<<i<<" = "<<(tabla*i)<<endl; } } if(tabla == 7){ for (int i=1; i<=limite; i++){ cout<<tabla<<" x "<<i<<" = "<<(tabla*i)<<endl; } } if(tabla == 8){ for (int i=1; i<=limite; i++){ cout<<tabla<<" x "<<i<<" = "<<(tabla*i)<<endl; } } if(tabla == 9){ for (int i=1; i<=limite; i++){ cout<<tabla<<" x "<<i<<" = "<<(tabla*i)<<endl; } } if(tabla == 10){ for (int i=1; i<=limite; i++){ cout<<tabla<<" x "<<i<<" = "<<(tabla*i)<<endl; } } }else{ cout<<"Tiene que ser un numero limite mayor a cero."<<endl; } }else{ cout<<"No ha seleccionado un numero correcto de la lista de tablas."<<endl; } cout<<"\nSi desea otra tabla digite si o no (s/n): "<<endl; cin>>respuesta; }while(respuesta == 's' || respuesta == 'S'); cout<<"\nSALIENDO..."; getch(); }

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