Seasons on Terra

  • 4
  • unavailable
An Earth year consists of four seasons, each of which lasts 3 months. While our ship was parked on this cradle of humanity, the Interplanetary Tax Service asked us to write a program to determine the season based on a number corresponding to the month of the year. We don't know why they want it. They say that it's none of our business. But they promised not to remain in our debt.
You can't complete this task, because you're not signed in.
  • Popular
  • New
  • Old
You must be signed in to leave a comment
Laurence Chadwell Level 7 , San Antonio
20 August, 02:28
I went out side of the box on this one.....didn't even use if else statements.
Brandon NicolleLevel 5 , Edmonton
17 August, 21:18
My code doesn't work for some reason. i thought using the || operator would make it easier? why is my else if statement not showing?
UserLevel 5 , Shymkent
18 June, 14:03
Help guys can't resolve lust Requirements Please help
Bipin kananiLevel 8 , Ahmedabad
13 June, 13:42
try this way
Michael MartinLevel 19 , Arlington
25 October 2018, 18:26
I'm just reviewing this course to see if it would be good for my son. I have a question on this section. This task requires knowledge of && or || for it to work, but I don't see where those concepts were covered in the lesson. Am I missing something?
RomanLevel 41
26 October 2018, 05:50
You can solve this task without && or || .
Michael MartinLevel 19 , Arlington
26 October 2018, 14:19
Yeah, after I asked that, I saw that it could be done. Sorry :)
24 June, 17:51
can you tell me some tips that how can i run it without using && or || "\n" because i put it into questions all suggest me to use && or ||...... :{
24 June, 17:52
how can you explain me ??? i did not get it
RomanLevel 41
25 June, 05:31
"switch" or "if ... else if" without && or ||
Muhammad AsadLevel 9 , Gujranwala
6 September 2018, 18:52
I cannot solve the problem please help me I have this code but i get errorpublic class Solution { public static void main(String[] args) { checkSeason(12); checkSeason(4); checkSeason(7); checkSeason(10); } public static void checkSeason(int month) { if(month>=3 && month<=5) { System.out.println("spring"); } else if(month>=6 && month<=8) { System.out.println("summer"); } else if(month>=9 && month<=11){ System.out.println("autumn"); }if(month==12 && month<=2) { System.out.println("winter"); } } }
RomanLevel 41
7 September 2018, 05:50
If you need help, something isn't right in your code, the server won't accept your solution (even if you are 100% sure that it is correct). Describe your question/issue in the HELP section at
Sudarsan RLevel 8 , Bangalore
16 July, 04:28
what was the solution for this?
TomekLevel 5 , Torun
7 November, 20:01
Look on your last if condition : (month==12 && month<=2) - that is impossible. Variable month can't has value 12 and less than 2 in the same time.