Question: I need the solution to question number 7 on page 374. Starting out with >>> C++ From Control Structures through Objects Ninth Edition Author: Tony

I need the solution to question number 7 on page 374.

"Starting out with >>> C++ From Control Structures through Objects" Ninth Edition

Author: Tony Gaddis

ISBN: 9780134498379

Question:

The formula for converting a temperature from Fahrenheit to Celsius is

C= 5/9(F-32)

where F is the Fahrenheit temperature and C is the celsius temperature. Write a function named "celsius" that accepts a Fahrenheit temperature as an argument. The function should return the temperature, converted to Celsius. Demonstrate the function by calling it in a loop that displays a table of the Fahrenheit temperatures 0 through 20 and their celsius equivalents.

Other directions:

How many conversions are we going to do? 21 conversions

How many conversions are we coding? Unlimited

What alignment is our data going to be? Right

Put boxes around all our numbers

All numbers must be WHOLE numbers

Write a function named CELSIUS

Accept a Fahrenheit value/reference being passed in in an argument

The function should return a temperature value in Celsius

Demonstrate the function by calling it in a loop

Fahrenheit temperatures have to be 0 thru 20 and their Celsius equivalents

Example table: Vertical Table 2 columns boxes around numbers

Menu should be centered on the screen

Data types are double

Decimal places should be set precision to 2 places

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!