Created
March 23, 2013 02:59
-
-
Save FernandaBernardo/5226231 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import java.util.Scanner; | |
class Meses { | |
public static void main (String[] args){ | |
Scanner sc = new Scanner (System.in); | |
System.out.println ("Digite um numero"); | |
int mes = sc.nextInt (); | |
switch (mes) { | |
case 1: | |
System.out.println("Seu mes eh janeiro"); | |
break ; | |
case 2: | |
System.out.println("Seu mes eh fevereiro"); | |
break; | |
case 3: | |
System.out.println("Seu mes eh marco"); | |
break ; | |
case 4: | |
System.out.println("Seu mes eh abril"); | |
break ; | |
case 5: | |
System.out.println("Seu mes eh maio"); | |
break ; | |
case 6: | |
System.out.println("Seu mes eh junho"); | |
break ; | |
case 7: | |
System.out.println("Seu mes eh julho"); | |
break ; | |
case 8: | |
System.out.println("Seu mes eh agosto"); | |
break; | |
case 9: | |
System.out.println("Seu mes eh setembro"); | |
break ; | |
case 10: | |
System.out.println("Seu mes eh outubro "); | |
break ; | |
case 11: | |
System.out.println("Seu mes eh novembro"); | |
break ; | |
case 12: | |
System.out.println("Seu mes eh dezembro"); | |
break ; | |
default: | |
System.out.println("Um ano soh 12 meses seu animal"); | |
} | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment