This code runs but it only prints the first two values. It doesn't print checkSeason(7) and checkSeason(10)
package com.codegym.task.task04.task0411;
/*
Seasons on Terra
*/
public class Solution {
public static void main(String[] args) {
checkSeason(12);
checkSeason(4);
checkSeason(7);
checkSeason(10);
}
public static void checkSeason(int month) {
if (month <= 2 && month >= 1)
System.out.println("winter");
else if (month == 12)
System.out.println("winter");
else if (month <= 5 && month >= 3)
System.out.println("spring");
else if (month <= 6 && month >= 8)
System.out.println("summer");
else if (month <= 9 && month >= 11)
System.out.println("autumn");
}
}