Ad
  • Custom User Avatar

    public class GrassHopper {

    public static String weatherInfo(int temp) {
        double c = convertToCelsius(temp);
        if (c > 0)
            return (c + " is above freezing temperature");
        else
            return (c + " is freezing temperature");
    }
    
    public static double convertToCelsius(double temperature) {
        double celsius = (temperature - 32.0) * (5/9.0);
        return celsius;
    }
    

    }

    test5
    expected:<23.33333333333333[2] is above freezing t...> but was:<23.33333333333333[6] is above freezing t...>

    1 HOUR I THINK BUT NOT FIND SOLUTION