Advertisement
Guest User

Untitled

a guest
Jul 16th, 2019
81
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.00 KB | None | 0 0
  1. #include <iostream>
  2. #include <stdio.h>
  3.  
  4. using namespace std;
  5.  
  6. int main(int argc, char** argv) {
  7.  
  8.  
  9. int opcao;
  10.  
  11. do {
  12.  
  13. printf("\n-------------------MENU------------------------");
  14. printf("\n Escolha a opcao");
  15. printf("\n ______________________________________________ ");
  16. printf("\n |1 - Informar venda diaria |");
  17. printf("\n |2 - Visualizar vendas diarias do mes |");
  18. printf("\n |3 - Calcular media mensal de vendas diarias |");
  19. printf("\n |4 - Sair |");
  20. printf("\n |____________________________________________|\n");
  21.  
  22. scanf("\n%d", &opcao);
  23.  
  24. printf("option -> %d\n", opcao);
  25.  
  26. system("cls");
  27.  
  28. switch (opcao)
  29. {
  30. case 1:
  31. printf("1!\n");
  32. break;
  33. case 2: printf("2!\n");
  34. break;
  35. case 3:
  36. printf("3!\n");
  37. break;
  38. case 4:
  39. printf("do nothing!\n");
  40. break;
  41. default: printf("\nOpcao invalida, tente de novo"); break;
  42. }
  43.  
  44. } while (opcao != 4);
  45. return 0;
  46. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement