orlandoju

cerditos

Jun 5th, 2022
122
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C++ 1.07 KB | None | 0 0
  1. #include <iostream>
  2. //#include "creditos_cerditos.h"
  3.  
  4. using namespace std;
  5. // declaracion de funcion creditos cerditos
  6. //void creditoscerditos();
  7.  
  8. int main()
  9. {
  10.     int opcion;
  11.     string salida;
  12.  
  13.     cout << "GRAN CERDO" << endl;
  14.     cout << "-------------------------"<<endl;
  15.     cout << "1- JUGAR "<<endl;
  16.     cout << "2- ESTADISTICAS "<<endl;
  17.     cout << "3- CERDITOS "<<endl;
  18.     cout << "-------------------------"<<endl;
  19.     cout << "0- SALIR "<<endl;
  20.     cin>> opcion;
  21.  
  22.     switch(opcion){
  23.         case 1:
  24.             cout<<"Eligio opcion 1"<<endl;
  25.         break;
  26.         case 2:
  27.             cout<<"Eligio opcion 2"<<endl;
  28.         break;
  29.         case 3:
  30.             cout<<"Eligio opcion 3"<<endl;
  31.            // void creditoscerditos();
  32.         break;
  33.         case 0:
  34.             cout<<"¿Esta seguro que desea salir? (S/N) S para si y N para no"<<endl;
  35.             cin>>salida;
  36.             if(salida==S){
  37.                     return 0;
  38.             }
  39.             else if
  40.                 cout<<"Adios"<<endl;
  41.  
  42.         break;
  43.  
  44.     }
  45.  
  46.   return 0;
  47. }
  48.  
Advertisement
Add Comment
Please, Sign In to add comment