Mar 19, 2010

JAVA Program to Print the season of a given month

public class Season
{
public static void main(String[] args)
{
int month=4;
switch(month)
{
case 1:
case 2:
case 3:
System.out.println("Automn");
break;
case 4:
case 5:
case 6:
System.out.println("summer");
break;

case 7:
case 8:
case 9:
System.out.println("winter");
break;
case 10:
case 11:
case 12:
System.out.println("spring");
break;
default:
System.out.println("Wrong input");

}
}
}
Download this program Here

1 comment: