Advertisement
Guest User

Untitled

a guest
Mar 26th, 2017
58
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.96 KB | None | 0 0
  1.  
  2. public class mes {
  3. public static void maid (String[] args)
  4. {
  5. int mes;
  6. System.out.println ("Introduzca un nro de mes:");
  7. Scanner sc = newScanner (System.in);
  8. mes = sc.nextlnt();
  9.  
  10.  
  11. Switch(mes)
  12. {
  13. case 1:
  14. System.out.println("Enero");
  15. break;
  16. case 2:
  17. System.out.println("Febrero");
  18. break;
  19. case 3:
  20. System.out.println("Marzo");
  21. break;
  22. case 4:
  23. System.out.println("Abril");
  24. break;
  25. case 5:
  26. System.out.println("Mayo");
  27. break;
  28. case 6:
  29. System.out.println("Junio");
  30. break;
  31. case 7:
  32. System.out.println("Julio");
  33. break;
  34. case 8:
  35. System.out.println("Agosto");
  36. break;
  37. case 9:
  38. System.out.println("Septiembre");
  39. break;
  40. case 10:
  41. System.out.println("Octubre");
  42. break;
  43. case 11:
  44. System.out.println("Noviembre");
  45. break;
  46. case 12:
  47. System.out.println("Diciembre");
  48. break;
  49. default:
  50. System.out.println("Mes no valido");
  51. }
  52. }
  53. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement