Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- public class mes {
- public static void maid (String[] args)
- {
- int mes;
- System.out.println ("Introduzca un nro de mes:");
- Scanner sc = newScanner (System.in);
- mes = sc.nextlnt();
- Switch(mes)
- {
- case 1:
- System.out.println("Enero");
- break;
- case 2:
- System.out.println("Febrero");
- break;
- case 3:
- System.out.println("Marzo");
- break;
- case 4:
- System.out.println("Abril");
- break;
- case 5:
- System.out.println("Mayo");
- break;
- case 6:
- System.out.println("Junio");
- break;
- case 7:
- System.out.println("Julio");
- break;
- case 8:
- System.out.println("Agosto");
- break;
- case 9:
- System.out.println("Septiembre");
- break;
- case 10:
- System.out.println("Octubre");
- break;
- case 11:
- System.out.println("Noviembre");
- break;
- case 12:
- System.out.println("Diciembre");
- break;
- default:
- System.out.println("Mes no valido");
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement