what is wrong here... first two conditions are met.
but the last 3 conditions are not
package com.codegym.task.task04.task0416;
/*
Crossing the road blindly
*/
import java.util.Scanner;
class Solution{
public static void main(String[] args){
Scanner sc = new Scanner(System.in);
double x = sc.nextDouble();
if(
(x>=0.1 && x<=3.0) ||
(x>=8.1 && x<=11.0) ||
(x>=16.1 && x<=19.0) ||
(x>=24.1 && x <=27.0) ||
(x>=32.1 && x <=35.0) ||
(x>=40.1 && x <=43.0) ||
(x>=48.1 && x <=51.0) ||
(x>=56.1 && x <=60.0) ||
(x>=5.1 && x <=8.0) ||
(x>=13.1 && x <=16.0) ||
(x>=21.1 && x <=24.0) ||
(x>=29.1 && x <=32.0) ||
(x>=37.1 && x <=40.0) ||
(x>=45.1 && x <=48.0) ||
(x>=53.1 && x <=56.0)
){
System.out.println("green");
}
else if(
(x>=3.1 && x<=4.0) ||
(x>=11.1 && x<=12.0) ||
(x>=19.1 && x<=20.0) ||
(x>=27.1 && x <=28.0) ||
(x>=35.1 && x <=36.0) ||
(x>=43.1 && x <=44.0) ||
(x>=51.1 && x <=52.0) ||
(x>=59.1 && x <=60.0)
){
System.out.println("yellow");
}
else if(
(x>=4.1 && x<=5.0) ||
(x>=12.1 && x<=13.0) ||
(x>=20.1 && x<=21.0) ||
(x>=28.1 && x <=29.0) ||
(x>=36.1 && x <=37.0) ||
(x>=44.1 && x <=45.0) ||
(x>=52.1 && x <=53.0)
){
System.out.println("red");
}
else{
System.out.println("Error");
}
}
}