Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

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)

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Big Data, Mining, And Analytics Components Of Strategic Decision Making

Authors: Stephan Kudyba

1st Edition

1466568704, 9781466568709

More Books

Students also viewed these Databases questions