It stated 60 (inclusive), so as I understand it should be:
if(age < 20 || age >=60)
but solution is:
if(age < 20 || age > 60) - its not inclusive
package en.codegym.task.pro.task03.task0307;
import java.util.Scanner;
/*
To work or not to work? That is the question
*/
public class Solution {
public static void main(String[] args) {
//write your code here
Scanner sc = new Scanner(System.in);
int age = sc.nextInt();
if(!(age > 20 || age <= 60) && (age < 20 ||age >= 60))
System.out.println("You don't have to work");
}
}