If I try it myself it works, even with .7 or other numbers. Idk why red and yellow dont work
package de.codegym.task.task04.task0416;
/*
Blind über die Straße gehen
*/
import java.io.*;
public class Solution {
public static void main(String[] args) throws Exception {
BufferedReader reader = new BufferedReader(new InputStreamReader(System.in));
String zahl = reader.readLine();
double t = Double.parseDouble(zahl);
double zyklus = t%5;
if (zyklus <= 3)
{
System.out.println("grün");
} else if (zyklus <= 4)
{
System.out.println("gelb");
} else if (zyklus <= 5)
{
System.out.println("rot");
}
}
}