Estaciones.java 1.2 KB
Newer Older
Nelson Ruiz committed
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50
class Estaciones {
    public static void main(String[] args) {	
		int numero = 11;//el valor del mes
		switch(numero)
        {
            case 12:
            System.out.println("Es verano");   
            break;
        case 1:
            System.out.println("Es verano");
            break;
        case 2:
            System.out.println("Es verano");
            break;
        case 3:
            System.out.println("Es otonio");
            break;
        case 4:
            System.out.println("Es otonio");
            break;
        case 5:
            System.out.println("Es otonio");
            break;
        case 6:
            System.out.println("Es invierno");
            break;
        case 7:
            System.out.println("Es invierno");
            break;
        case 8:
            System.out.println("Es invierno");
            break;
        case 9:
            System.out.println("Es primavera");
            break;
        case 10:
            System.out.println("Es primavera");
            break;
        case 11:
            System.out.println("Es primavera");
            break;
        default:
            System.out.println("numero no es valido");
            break;

        }
     }
		
}