class FahrenheitToCelsius {
public static void main(String[] args) {
// body temperature
double temp = 98.6;
System.out.println("Fahrenheit: " + temp);
temp = (temp - 32) * 5 / 9;
System.out.println("Celsius: " + temp);
}
}
Output:
$ java FahrenheitToCelsius Fahrenheit: 98.6 Celsius: 37.0