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 == 12 || month <= 2 ) {
System.out.println("winter");
{ else if (month >= 3 || month <=5) {
System.out.println("spring");
} else if (month >= 6 || month <= 8) {
System.out.println("summer");
} else {
System.out.println("autumn");
}
}
}
Why it doesn't compile?
Resolved
Comments (3)
- Popular
- New
- Old
You must be signed in to leave a comment
Anthony Chalk
28 October 2019, 23:16
line 19, the { at the beginning of the line should be }
+2
Igna P
29 October 2019, 08:12
omg... silly mistake! Thank you so much!
0
Anthony Chalk
29 October 2019, 10:55
the reason I picked up on it is because I make the same mistake myself the whole time :D
0