Question: In C++ The formula for converting a temperature from Fahrenheit to Celsius is C=5/9(f-32) And the formula for converting from Celsius to Fahrenheit is F=9/5*C

In C++

The formula for converting a temperature from Fahrenheit to Celsius is

C=5/9(f-32)

And the formula for converting from Celsius to Fahrenheit is

F=9/5*C + 32

Write a function named celsius that accepts a Fahrenheit temperature as an argument, and returns that temperature converted to Celsius. Write another function named fahrenheit that accepts a Celsius temperature as an argument, and returns that temperature converted to Fahrenheit.

Demonstrate the first function by calling it in a loop that display a table of Fahrenheit temperatures 0 through 20, and their Celsius equivalent. Demonstrate the second function by calling it in a loop that display a table of Celsius temperatures 0 through 20, and their Fahrenheit equivalent.

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!