Question: Functions Goal: In this module, you learned about functions. You will nowwrite a program that uses two functions to convert from Celsius toFahrenheit and vice

Functions

Goal: In this module, you learned about functions. You will nowwrite a program that uses two functions to convert from Celsius toFahrenheit and vice versa.

Write this program using functions. This is a requirement forthis assignment. You will earn a grade of zero if youdo not demonstrate the use of functions to dothis assignment.


Write a program that gives the user a menu to choose from –
1. Convert temperature input from the user in degrees Fahrenheit todegrees Celsius
2. Convert temperature input from the user in degrees Celsius todegrees Fahrenheit
3. Quit.


Formulae you will need: C = (5 / 9) *(F-32) and F = (9/5) * C + 32

1. Use functions to accomplish 1 and 2 above.
2. Use at least one function for each scenario (i.e. convertingtemperature from degrees Fahrenheit to degrees Celsius and fromdegrees Celsius to degrees Fahrenheit). You must call themfrom the main function. You can use more functions if you seefit to do so.


Test the program with the following values:
68 degree F = 20 degree C
20 degree C = 68 degree F
-22 degree F = -30 degree C
0 degree C = 32 degree F

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 Programming Questions!