How would you reorder the lines of code in a Java program to convert a given Fahrenheit temperature of a healthy human body to Celsius and display it?
Types and variables
Warming up with a temperature tweak
Report a typo
Reorder lines using drag or arrows. Adjust indentation with left buttons
double fahrenheit = 98.6;
}
public class TemperatureConverter {
}
double celsius = (fahrenheit - 32) * 5 / 9;
public static void main(String[] args) {
System.out.print("Body temperature in Celsius: " + celsius + "\n");
Create a free account to access the full topic
By continuing, you agree to the JetBrains Academy Terms of Service as well as Hyperskill Terms of Service and Privacy Policy.