Ver Mensaje Individual
  #1 (permalink)  
Antiguo 11/03/2011, 13:05
Avatar de baker1562
baker1562
 
Fecha de Ingreso: marzo-2011
Ubicación: Puntarenas
Mensajes: 261
Antigüedad: 13 años, 3 meses
Puntos: 9
Pregunta error a la hora de ejecutar C++

Hola, me podrian ayudar con este codigo, no se porque no se ejecuta, alguien me podria ayudar

Código C++:
Ver original
  1. #include <iostream>
  2. #include <cmath>
  3. #include <ctime>
  4. #include <iomanip>
  5.  
  6. using namespace std;
  7.  
  8. int main()
  9. {
  10.     int consultorio[15];
  11.     string paciente1[15]="";
  12.     string paciente2[15]="";
  13.     string paciente3[15]="";
  14.     string paciente4[15]="";
  15.     string paciente5[15]="";
  16.     string paciente6[15]="";
  17.     int identificacion1[15];
  18.     int identificacion2[15];
  19.     int identificacion3[15];
  20.     int identificacion4[15];
  21.     int identificacion5[15];
  22.     int identificacion6[15];
  23.     int telefono1[15];
  24.     int telefono2[15];
  25.     int telefono3[15];
  26.     int telefono4[15];
  27.     int telefono5[15];
  28.     int telefono6[15];
  29.     int horacita[15];
  30.     int especialidad;
  31.     int consulta;
  32.     int opcion;
  33.     int control;
  34.     int i;
  35.     string resp;
  36.  
  37.    
  38.     if(opcion==0)
  39.     {
  40.         cout<<"Digite#1 para Consultoria"<<endl;
  41.         cout<<"Digite#2 para Especialistas2"<<endl;
  42.         cin >> opcion;
  43.         system("cls");
  44. }
  45.    
  46.     if(opcion==1)
  47.     {
  48.         cout<<"Digite el numero del consultorio a atender.Valido del 1 al 6."<<endl;
  49.        
  50.         int i=1;
  51.        
  52.         if(opcion==1)
  53.         {
  54.            cout<<setw(15)<<"Medicina General"<<endl;
  55.            cout<<"Digite el nombre del paciente:"<<endl;
  56.            cin>>paciente1[i];
  57.            cout<<"Digite el numero de identificacion:"<<endl;
  58.            cin>>identificacion1[i];
  59.            cout<<"Digite el numero de telefono:"<<endl;
  60.            cin>>telefono1[i];
  61.            cout<<"Lleva"<<" "<<i<<"procesadas!"<<endl;
  62.            i+=1;
  63.            }
  64.            }
  65.            return 0;
  66.            }

omitan las variables repetidas ya que esas son para los otros if, pero no se porque no se me ejecuta ayuda

saludos!!!