Код: Выделить всё
public static double fahrenheitToCelsius(double fahrenheit){
double celsius = (fahrenheit-32)*(5/9);
return celsius;
}
public static void printTemperatures(double fahrenheit){
System.out.println("F : " + fahrenheit);
System.out.println("C : " + fahrenheitToCelsius(fahrenheit));
}
Скажем: Farenheit = 75
(75-32)*(5/9)=43 *0.55556=23.888888?
Подробнее здесь: https://stackoverflow.com/questions/787 ... -returns-0