Warming up with a temperature tweak

Report a typo

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?

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