Advertisement
Glaas2

Menu

Feb 25th, 2012
193
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C++ 0.53 KB | None | 0 0
  1. #include<stdio.h>
  2. #include<stdlib.h>
  3.  
  4. int main(int argc, char *argv[])
  5. {  
  6.     int fin = 0;
  7.     int opc;
  8.    
  9.     while (fin == 0)
  10.         {
  11.         system("cls");
  12.         printf("Menú simple\n\n");
  13.    
  14.         printf("\t1] Ejecutar.\n");
  15.         printf("\t2] Ayuda.\n");
  16.         printf("\t3] Salir.\n");
  17.    
  18.         printf("\n\nOpcion: ");
  19.         scanf("%i", &opc);
  20.            
  21.         switch(opc)
  22.             {
  23.                 case 1:
  24.  
  25.                     break;
  26.                 case 2:
  27.  
  28.                     break;
  29.                 case 3:
  30.                     fin = 1;
  31.                     break;
  32.                 default:
  33.                     fin = 0;
  34.                     break;
  35.             }
  36.            
  37.         }
  38.    
  39.     system("pause");
  40.     return 0;
  41. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement