Advertisement
keviinrm7

SWITCH crear menu

May 27th, 2019
120
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.56 KB | None | 0 0
  1. /*
  2. * To change this license header, choose License Headers in Project Properties.
  3. * To change this template file, choose Tools | Templates
  4. * and open the template in the editor.
  5. */
  6. package clase.pkg27.de.mayo;
  7. import java.util.Scanner;
  8. /**
  9. *
  10. * @author lab5-pc5
  11. */
  12. public class CLASE27DEMAYO {
  13.  
  14. /**
  15. * @param args the command line arguments
  16. */
  17. public static void main(String[] args) {
  18. // TODO code application logic here
  19. System.out.println(" Comidas tipicas");
  20. System.out.println("1. Tigrillo - $3.00");
  21. System.out.println("2. Encebollado - $2.00");
  22. System.out.println("3. Caldo de pichon - $2.00");
  23. System.out.println("4. Yapingacho - $3.00");
  24. System.out.println("5. Cuy - $5.00");
  25. System.out.println("6. Salir");
  26. System.out.print("Elija opcion: ");
  27. Scanner teclado = new Scanner(System.in);
  28. int opcion = teclado.nextInt();
  29. switch (opcion)
  30. {
  31. case 1:
  32. System.out.println("Tigrillo entregado");
  33. break;
  34. case 2:
  35. System.out.println("* * * * * *");
  36. break;
  37. case 3:
  38. System.out.println("*");
  39. break;
  40. case 4:
  41. System.out.println("* * *");
  42. break;
  43. case 5:
  44. System.out.println("* *");
  45. break;
  46. case 6:
  47. System.out.println("Gracias por su compra.");
  48. break;
  49. default:
  50. System.out.println("OPCION INCORRECTA MALDITO BRUTO.");
  51. break;
  52.  
  53.  
  54. }
  55.  
  56.  
  57.  
  58.  
  59.  
  60.  
  61. }
  62.  
  63. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement