/**
* Hw1
*
* @author Linguiyi
* @version 1.0
* @date 2023/7/11 17:31
*/
public class Hw1 {
public static void main(String[] args) {
//seasonWithIf(4);
seasonWithSwitch(3);
}
public static void seasonWithIf (int month){
if(month < 1 || month >12){
System.out.println("您的输入有误!");
}
if(month == 3||month == 4 || month == 5){
System.out.println("春季");
}
if(month == 6||month == 7 || month == 8){
System.out.println("夏季");
}
if(month == 9||month == 10 || month == 11){
System.out.println("秋季");
}
if(month == 12||month == 1 || month == 2){
System.out.println("冬季");
}
}
public static void seasonWithSwitch (int month){
if(month < 1 || month >12){
System.out.println("您的输入有误!");
}
switch (month){
case 3:
case 4: