Hi everyone,
Can anyone tell me what is wrong with my code. It runs but still does not meet the requirements.
Thanks
package com.codegym.task.task04.task0416;
/*
Crossing the road blindly
*/
import java.io.*;
public class Solution {
public static void main(String[] args) throws Exception {
BufferedReader reader = new BufferedReader(new InputStreamReader(System.in));
double t = Double.parseDouble(reader.readLine());
if (t>4) t=t%4;
if (t>60) t = t%60;
if (t>0 && t<3)
System.out.print("green");
else if (t>=3 && t <4)
System.out.print("yellow");
else System.out.print("red");
}
}