Question: Java: Write a method to convert from Celsius to Fahrenheit using the following method header: // convers form Celsius to Fahrenheit public static double celsiusToFahrenheit
Java: Write a method to convert from Celsius to Fahrenheit using the following method header:
// convers form Celsius to Fahrenheit
public static double celsiusToFahrenheit (double celsius)
The formula for the conversion is: Fahrenheit = ( 9/5) * Celsius +32
Write a test program that asks the user to input a Celsius value, invoke this method, then print out the corresponding Fahrenheit value.
Sample Run:
Please input the temperature in Celsius: 32
32 Celsius equals to 89.6 Fahrenheit.
Bonus Write a test program that invokes this method several times to display the following tables using loops:
Celsius Fahrenheit 40.0 104.0
39.0 102.2
32.0 89.6
31.0 87.8
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
