CodeGym/Java Tasks/To work or not to work? That is the question

To work or not to work? That is the question

  • 3
  • Locked
Let's write a program that will read an age from the keyboard. If the age is in the range from 20 to 60 (inclusive), then don't display anything. Otherwise, display the phrase "You don't have to work". You can (and must!) do this with only one if statement (without an else block). Hint: use the || (
You can't complete this task, because you're not signed in.
Comments (4)
  • Popular
  • New
  • Old
You must be signed in to leave a comment
Mihaela
Level 6 , Romania
5 October 2023, 18:04
There are no mistakes here.
muchemi
Level 6 , United States of America, United States
2 April 2023, 00:51
Can the support check for mistakes in their tests? This is getting frustrating!
John Squirrels Website Admin at CodeGym
3 April 2023, 12:46
What mistakes do you mean? Please provide more details.
Anonymous #11229118
Level 6 , Montréal, Canada
25 December 2022, 13:17
They say exclusive but it seems they made a mistake it's from 20 to 60 exclusive ( ]20, 60[ ) otherwise it don't work and in their solution they didn't inlude 20 or 60.