It works(?) but the requirements arent met.
I dont have any idea.
package pl.codegym.task.task04.task0416;
/*
Przejście przez ulicę na oślep
*/
import java.io.*;
public class Solution {
public static void main(String[] args) throws Exception {
BufferedReader reader = new BufferedReader(new InputStreamReader(System.in));
String t1 = reader.readLine();
double t = Double.parseDouble(t1);
System.out.println(+ t);
if (t >= 5)
{
do
{
t = t-5;
System.out.println("Tyle wynosi t = " + t);
}
while (t >= 5);
}
if (t >= 0 && t < 3)
System.out.println("zielone");
if (t >= 3 && t < 4)
System.out.println("pomarańczowe");
if (t >= 4 && t < 5)
System.out.println("czerwone");
}
}