Computer Applications

The normal temperature of human body is 98.6°F. Write a program to convert the temperature into degree Celsius and display the output.

Hint: c / 5 = f - 32 / 9

Java

Java Operators

145 Likes

Answer

public class KboatCelsius
{
    public static void main(String args[]) {
        double f = 98.6;
        double c = 5 * (f - 32) / 9.0;
        System.out.println("Temperature in Degree Celsius = " + c);
    }
}

Variable Description Table

Program Explanation

Output

Answered By

72 Likes


Related Questions