If the light is green, display: "green" If the light is green, display: "yellow" If the light is green, display: "red". These are the errors I get. Somebody can help me please?
package com.codegym.task.task04.task0416;
/*
Crossing the road blindly
*/
import java.io.*;
public class Solution {
public static void main(String[] args) throws Exception {
//write your code here
BufferedReader keyboard = new BufferedReader(new InputStreamReader(System.in));
// 0,1,2,5,6,7 == groen || 3 en 8 == geel || 4 en 9 == rood
try {
// System.out.println("How many minutes are passed from the last hour? ");
String input = keyboard.readLine();
double i = Double.parseDouble(input);
i = i % 10;
if(i > 0.0 && i <= 2.9 || i > 4.9 && i < 8.0) {
System.out.println("green");
}
else if(i >= 3.0 && i < 4.0 || i > 7.9 && i <= 8.9) {
System.out.println("yellow");
}
else if(i >= 4.0 && i < 5.0 || i > 8.9 && i <= 9.9) {
System.out.println("red");
}
} catch(IOException e) {
e.printStackTrace();
}
}
}