Advertisement
Guest User

Untitled

a guest
May 22nd, 2019
95
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C++ 5.08 KB | None | 0 0
  1. #include <iostream>
  2. #include <conio.h>
  3. #include <bits/stdc++.h>
  4.  #include <stdio.h>  
  5.  #include <windows.h>
  6. using namespace std;
  7.  void gotoxy(int x,int y){  
  8.       HANDLE hcon;  
  9.       hcon = GetStdHandle(STD_OUTPUT_HANDLE);  
  10.       COORD dwPos;  
  11.       dwPos.X = x;  
  12.       dwPos.Y= y;  
  13.       SetConsoleCursorPosition(hcon,dwPos);  
  14.  }  
  15. int main(){
  16.     int opcionp;
  17.     do{
  18.         gotoxy(40,0);
  19.         cout<<"Viajes y tours"<<endl;
  20.         cout<<"1. Viajes terrestres"<<endl;
  21.         cout<<"2. Viajes aereos"<<endl;
  22.         cout<<"3. Viajes maritimos"<<endl;
  23.         cout<<"4. Salir"<<endl;
  24.         cout<<"¿En cual de estas formas desea viajar?"<<endl;
  25.         cin>>opcionp;
  26.         switch(opcionp){
  27.             case 1:
  28.                 int opciont;
  29.                 do{
  30.                 system("cls");
  31.                 gotoxy(40,0);
  32.                 cout<<"Viajes terrestres"<<endl;
  33.                   cout<<"1. Flota Macarena "<<endl;
  34.                   cout<<"2. Autofusa"<<endl;
  35.                   cout<<"3. Contrashuila"<<endl;
  36.                   cout<<"4. Bolivariano"<<endl;
  37.                   cout<<"5. Regresar"<<endl;
  38.                   cout<<" A continuacion selecciones su flota de preferencia: "<<endl;
  39.                   cin>>opciont;
  40.                   switch(opciont){
  41.                     case 1:
  42.                         system("cls"); 
  43.                           int opmaca;
  44.                           do{  
  45.                           gotoxy(40,0);
  46.                           cout<<"-------Destinos y horas--------"<<endl;
  47.                           cout<<" Destino:     Hora:"<<endl;
  48.                           cout<<"1. Melgar      4:00 p.m"<<endl;
  49.                           cout<<"2. Bogota      6:00 a.m"<<endl;
  50.                           cout<<"3. Quibdo      8:00 p.m"<<endl;
  51.                           cout<<"4. Cucuta      5:00 a.m"<<endl;
  52.                           cout<<"5. Regresar"<<endl;
  53.                           cout<<"¿A cual destino desea ir?"<<endl;
  54.                           cin>>opmaca;
  55.                           if(opmaca==1||opmaca==2||opmaca==3||opmaca==4){
  56.                           opmaca=5;
  57.                           opciont=5;
  58.                           opcionp=4;
  59.                           }else if(opmaca>5){
  60.                             cout<<"Lo sentimos esta opcion no existe"<<endl;
  61.                           }
  62.                     }while(opmaca!=5);
  63.                     system("cls");
  64.                         break;
  65.                            case 2:
  66.                             system("cls"); 
  67.                             int opauto;
  68.                           do{  
  69.                             gotoxy(40,0);  
  70.                           cout<<"-------Destinos y horas--------"<<endl;
  71.                           cout<<" Destino:     Hora:"<<endl;
  72.                           cout<<"1. Pasto      4:00 p.m"<<endl;
  73.                           cout<<"2. Saboya      6:00 a.m"<<endl;
  74.                           cout<<"3. Zipaquira      8:00 p.m"<<endl;
  75.                           cout<<"4. Chia      5:00 a.m"<<endl;
  76.                           cout<<"5. Regresar"<<endl;
  77.                           cout<<"¿A cual destino desea ir?"<<endl;
  78.                           cin>>opauto;
  79.                           if(opauto==1||opauto==2||opauto==3||opauto==4){
  80.                           opauto=5;
  81.                           opciont=5;
  82.                           opcionp=4;
  83.                           }else if(opauto>5){
  84.                             cout<<"Lo sentimos esta opcion no existe"<<endl;
  85.                           }
  86.                     }while(opauto!=5);
  87.                     system("cls");
  88.                               break;
  89.                                 case 3:
  90.                                     system("cls");
  91.                                         int ophuila;
  92.                           do{
  93.                             gotoxy(40,0);      
  94.                           cout<<"-------Destinos y horas--------"<<endl;
  95.                           cout<<" Destino:     Hora:"<<endl;
  96.                           cout<<"1. Pitalito      4:00 p.m"<<endl;
  97.                           cout<<"2. Raquira      6:00 a.m"<<endl;
  98.                           cout<<"3. Flandes      8:00 p.m"<<endl;
  99.                           cout<<"4. Espinal      5:00 a.m"<<endl;
  100.                           cout<<"5. Regresar"<<endl;
  101.                           cout<<"¿A cual destino desea ir?"<<endl;
  102.                           cin>>ophuila;
  103.                           if(ophuila==1||ophuila==2||ophuila==3||ophuila==4){
  104.                           ophuila=5;
  105.                           opciont=5;
  106.                           opcionp=4;
  107.                           }else if(ophuila>5){
  108.                             cout<<"Lo sentimos esta opcion no existe"<<endl;
  109.                           }
  110.                     }while(ophuila!=5);
  111.                     system("cls");
  112.                                     break;
  113.                                     case 4:
  114.                                             system("cls");
  115.                                         int opboli;
  116.                           do{
  117.                             gotoxy(40,0);      
  118.                           cout<<"-------Destinos y horas--------"<<endl;
  119.                           cout<<" Destino:     Hora:"<<endl;
  120.                           cout<<"1. Pitalito      4:00 p.m"<<endl;
  121.                           cout<<"2. Raquira      6:00 a.m"<<endl;
  122.                           cout<<"3. Flandes      8:00 p.m"<<endl;
  123.                           cout<<"4. Espinal      5:00 a.m"<<endl;
  124.                           cout<<"5. Regresar"<<endl;
  125.                           cout<<"¿A cual destino desea ir?"<<endl;
  126.                           cin>>opboli;
  127.                           if(opboli==1||opboli==2||opboli==3||opboli==4){
  128.                           opboli=5;
  129.                           opciont=5;
  130.                           opcionp=4;
  131.                           }else if(opboli>5){
  132.                             cout<<"Lo sentimos esta opcion no existe"<<endl;
  133.                           }
  134.                     }while(opboli!=5);
  135.                     system("cls");
  136.                                         break;
  137.                                                     default:
  138.                                                     cout<<"Lo sentimos esta opcion no existe"<<endl;
  139.                   }
  140.             }while(opciont!=5);
  141.             system("cls");
  142.                 break;
  143.                    case 2:
  144.                    
  145.                      break;
  146.                         case 3:
  147.                            
  148.                               break;
  149.                                
  150.                                     case 4:
  151.                                         opcionp=4;
  152.                                             break;
  153.                                        default: system("cls");
  154.                                            gotoxy(10,0); cout<<"Lo sentimos no tenemos esta opcion de viaje por el momento o ingreso algo mal"<<endl;
  155.                                        cout<<"Ingrese 0 para retornar al menu principal: ";
  156.                                        cin>>opcionp;
  157.                                        system("cls");
  158.         }
  159.     }while(opcionp!=4);
  160.    
  161.  
  162.    
  163.                             system("cls");
  164.                             gotoxy(40,0);
  165.                             cout<<"Buen viaje, gracias por preferirnos"<<endl;
  166.  
  167.     return 0;
  168. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement