public static void checkSeason(int month) {
if (month >= 1 && month <= 3)
System.out.println("зима");
else if (month >= 4 && month <= 6)
System.out.println("весна");
else if (month >= 7 && month <= 9)
System.out.println("лето");
else if (month >= 10 && month <= 12)
System.out.println("осень");
else
System.out.println("Вы с другой планеты?");
}
Не понимаю, что он хочет в последнем пункте проверки?
Метод checkSeason должен выводить текст на экран согласно заданию.
Подскажите.package com.javarush.task.task04.task0411;
/*
Времена года на Терре
*/
public class Solution {
public static void main(String[] args) {
checkSeason(2);
checkSeason(5);
}
public static void checkSeason(int month) {
if (month >= 1 && month <= 3)
System.out.println("зима");
else if (month >= 4 && month <= 6)
System.out.println("весна");
else if (month >= 7 && month <= 9)
System.out.println("лето");
else if (month >= 10 && month <= 12)
System.out.println("осень");
else
System.out.println("Вы с другой планеты?");
}
}