I don't want anyone to tell me the answer to this task its' just that I'd like someone to explain to me what's the problem with my code and why it wouldn't display "yellow" or "red".
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 reader = new BufferedReader(new InputStreamReader(System.in));
String Stime = reader.readLine();
double time = Double.parseDouble(Stime);
String x;
double t = time%5;
if (0 <= t && t < 3) {
x = "green";
}
else if (3 < t && 4 >= t) {
x = "yellow";
}
else {
x = "red";
}
System.out.println(x);
}
}