Advertisement
gustavoblaze

Untitled

Sep 16th, 2019
148
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C++ 0.76 KB | None | 0 0
  1. #include <stdio.h>
  2. #include <stdlib.h>
  3. #include <locale.h>
  4.  
  5. int main(){
  6.   setlocale(LC_ALL, "PORTUGUESE");
  7.  
  8.   int user_op;
  9.  
  10.   printf("Cardápio\n");
  11.   printf("\t1 - Hamburguer\n");
  12.   printf("\t2 - Cheeseburguer\n");
  13.   printf("\t3 - Fritas\n");
  14.   printf("\t4 - Refrigerante\n");
  15.  
  16.   printf("Entre com um numero: ");
  17.   scanf("%i", &user_op);
  18.  
  19.   switch(user_op){
  20.     case 1:
  21.       printf("Voce escolheu hamburguer!\n");
  22.       break;
  23.     case 2:
  24.       printf("Voce escolheu Cheeseburguer!\n");
  25.       break;
  26.     case 3:
  27.       printf("Voce escolheu Fritas!\n");
  28.       break;
  29.     case 4:
  30.       printf("Voce escolheu Refrigerante!\n");
  31.       break;
  32.    
  33.     default:
  34.       printf("Voce não escolheu nenhuma opção valida!\n");
  35.   }
  36.  
  37.   return 0;
  38. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement