Question: Exercise 4a). Write a program that creates two double variables called Fahrenheit and Celsius and that assigns the value 39 to the variable Celsius. The
Exercise 4a). Write a program that creates two double variables called Fahrenheit and Celsius and that assigns the value 39 to the variable Celsius. The program then computes the equivalent temperature in degrees Fahrenheit and assigns this value to a variable called Fahrenheit. (Find the formula on the Web.) The program then writes the correct result in the form [3 marks] 39.0 C = .. F. Change the program to have a value of -7.5 Celsius. Include both the outputs in this report. Do not concern yourself with controlling the display of the decimal point. Solution (program):
Output (2 output)
Exercise 4b). Write a program that creates two double variables called Fahrenheit and Celsius and that assigns the value 77.5 to the variable Fahrenheit. The program then computes the equivalent temperature in degrees Celsius and assigns this value to a variable called Celsius. (Find the formula on the Web.) The program then writes the correct result in the form [3 marks] 77.5 F = .. C. Change the program to have a value of 45.0 Fahrenheit. Include both the outputs in this report. Do not concern yourself with controlling the display of the decimal point. Solution (program):
Output (2 output)
SOLUTIONS AND OUTPUTS NEED TO BE IN JAVA FORMAT.
NOTE: 2 OUTPUTS FOR EVERY SOLUTION.
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
