import java.util.Scanner;
class Month
{
public static void main(String[] args)
{
Scanner sc=new Scanner(System.in);
System.out.println("请输入月份");
int month = sc.nextInt();
if (month>=1&& month<=2)
{
System.out.println("冬");
}
else if (month>=3&& month<=5)
{
System.out.println("春");
}else if (month>=6&& month<=8)
{
System.out.println("夏");
}else if (month>=9&& month<=11)
{
System.out.println("秋");
}
else if(month==12)
{
System.out.println("冬");
}
else
System.out.println("月份错误");
}
}
|