ikasse78 ikasse78
  • 09-09-2021
  • Computers and Technology
contestada

Convert Fahrenheit to Celsius using this formula: F = (9/5)*C+32


getFahrenheit(30) → 86.0
getFahrenheit(0) → 32.0
getFahrenheit(20) → 68.0

Respuesta :

rajavamsi566
rajavamsi566 rajavamsi566
  • 09-09-2021

Answer:

The program is written in Java.

public class NewClass {

   

    public static double getFahrenheit(double celcius)

    {

        double fahrenheit;

        fahrenheit=32+(celcius*1.8);

        return fahrenheit;

    }

     

    public static void main(String [] args) {

        System.out.println(getFahrenheit(30));

        System.out.println(getFahrenheit(0));

        System.out.println(getFahrenheit(20));

       

    }

}

Ver imagen rajavamsi566
Answer Link

Otras preguntas

How long does it take to change a flat plain into mountains?
What happens to the carbon dioxide which collected in human tissues?
Y=1/3x2+2x-3 Please sketch graph of the equation or inequality and show work
Name the component of food whose digestion produce nitrogenous waste.
Y=1/3x2+2x-3 Please sketch graph of the equation or inequality and show work
Under what conditions will light bend?
Question 17 options:A 71.8 kg man goes from an area where the acceleration due to gravity is 9.79 m/s2 to an area where the acceleration due to gravity is 9.82
How far did the nature of the nazi party change once in power from 1933 onwards?
how many grams of NH3 can be prepared from 85.5 grams of N2 and 17.3 grams of H2 ?
what is the area of a circle with a diameter of 240mm