Please offer any suggestion why the compiler won't accept this program.
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 in = new BufferedReader (new InputStreamReader(System.in));
String sNumber = in.readLine();
float num = Float.parseFloat(sNumber);
String color = "";
if (num >= 0 && num <3) color = "green";
if (num >= 3 && num <4) color = "yellow";
if (num >= 4 && num<5) color = "red";
System.out.println(color);
}
}