(Solved) : Write Program Converts Fahrenheit Temperature Celsius Write Function Accept User Input Fah Q42682877 . . .

You are to write a program that converts a Fahrenheittemperature to Celsius.

You will write a function to accept user input of a Fahrenheittemperature. It should be data type double.

DATA INPUT VALIDATION: Do NOT accept a value higher than 125 nora value lower than -55.

Your function should return this value (Fahrenheit temperatureto your main() function.

Now that the main function has input from the user (theFahrenheit Temperature), main should call the Conversion functionto convert the Fahrenheit temp to Celsius. To do this do thefollowing:

In main function call the conversion function by passing to itthe Fahrenheit value.

In the conversion function, convert the Fahrenheit temperatureto Celsius. Here is the formula:

C = 5/9 (F – 32) .

Once you have done the conversion, return the Celsius value backto main().

Back in main() function, call your output function, and pass itboth the Fahrenheit and Celsius temperatures.   Theoutput function should display them and then return control back tomain(). Use 1 digit of precision to right of decimal point.

Back in main(), ask user if they wish to convert anothertemperature.   If user does, start process all overagain.

Function prototypes should be similar to the ones shownbelow:

double getfahrenheit();

double converttocelsius(double);

void displaytable(double,double);

Expert Answer

Answer to You are to write a program that converts a Fahrenheit temperature to Celsius. You will write a function to accept user i…

Leave a Comment


We are the best freelance writing portal. Looking for online writing, editing or proofreading jobs? We have plenty of writing assignments to handle.

Quick Links

Browse Solutions

Place Order

About Us

× How can I help you?