Question: Modify Lab 9 so that the calculations for temperature conversion are done within functions. For this assignment you will need three separate functions. They are

 Modify Lab 9 so that the calculations for temperature conversion are

Modify Lab 9 so that the calculations for temperature conversion are done within functions.

For this assignment you will need three separate functions. They are as follows:

C2F - Converts Celsius to Fahrenheit.

K2F - Converts Kelvin to Fahrenheit

N2F - Converts Newtons to Fahrenheit

Each of the above functions should take as an argument a double value which holds the temperature to be converted. These functions should also return a double value which holds the value converted to Fahrenheit. You should only modify the solution for lab 9 to replace the temperature conversion formulas to function calls. Make sure that you name these functions as outlined above. Remember, 35% of your grade is for following the directions.

The following is required for your three functions

Input - Temperature to be converted

Process - Covert value to Fahrenheit using the appropriate equation

Output - Temperature converted to Fahrenheit Your program should run like the following:

CAWINDOWS system32\cmd.exe his temperature conversion program converts other temperature types to Fahrenhe he temperature types are: it -Celcius K-Kelvin -Newton - exit o use the coverter you must input a value and one of the temparture types For example 32 C converts 32 degress from Celsius to Fahrenheit 32 C Please enter a value and it's type to be converted Please enter a value and it's type to be coverted 18K is-427.2 in Fahrenheit lease enter a alue and it's type to be converted 2C is 89.6 in Fahrenheit 0 N ON is 141.091in Fahrenheit 8 K lease enter a value and it's type to be converted Press any key to continue

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!