Ver Mensaje Individual
  #1 (permalink)  
Antiguo 16/03/2011, 11:09
Avatar de baker1562
baker1562
 
Fecha de Ingreso: marzo-2011
Ubicación: Puntarenas
Mensajes: 261
Antigüedad: 13 años, 2 meses
Puntos: 9
Ayuda con impresion en C++

Hola, saludos a todos, tengo un problema cuando le doy ejecutar al programa, no me ejecuta, quiero ponerle despues de los primero calculos en el if opcion==1, despues de que termine el calculo procese otro,(no el mismo sino otro de los calculos del 1 al 6) alguien me podria ayudar si es tan amable

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.     char opcion2;
  34.     int control;
  35.     int i=1;
  36.     string resp;
  37.     string c;
  38.  
  39.    
  40.    
  41.         cout<<"Digite#7 para Consultoria"<<endl;
  42.         cout<<"Digite#8 para Especialistas"<<endl;
  43.         cin >> opcion;
  44.         system("cls");
  45.  
  46.    
  47.     if(opcion==7){
  48.    
  49.         cout<<"Digite el numero del consultorio a atender.Valido del 1 al 6."<<endl;}
  50.         cin>>opcion;
  51.        
  52.         if(opcion==1)
  53.         do
  54.         {
  55.        
  56.            cout<<setw(15)<<"Medicina General"<<endl;
  57.            cout<<"Digite el nombre del paciente:"<<endl;
  58.            cin>>paciente1[i];
  59.            cout<<"Digite el numero de identificacion:"<<endl;
  60.            cin>>identificacion1[i];
  61.            cout<<"Digite el numero de telefono:"<<endl;
  62.            cin>>telefono1[i];
  63.            cout<<"Lleva"<<" "<<i<<"citas procesadas!"<<endl;
  64.            i+=1;
  65.            cout<<"Desea llevar otro calculo-S\N:"<<endl;
  66.            cin>>opcion2;
  67.            
  68.            }while(opcion2=="s");
  69.            
  70.            system("pause");
  71.            return 0;
  72.            }

omitan las variable reptidas ya que esas son para los otros if