Question: In C language. Using ( printf / scanf ). Write a program to display a table of Centigrade temperatures and their corresponding Fahrenheit temperatures. The

In C language. Using ( printf / scanf ).

Write a program to display a table of Centigrade temperatures and their corresponding Fahrenheit temperatures. The Centigrade temperatures will range from 0 to 20 degrees.

The formula for converting from Centigrade to Fahrenheit is:
F = (9 / 5) * C + 32
Use this exact formula - do not pre-calculate 9/5 as 1.8 (you will have to temporarily convert one of the numbers to a double (use type casting) for the equation to work correctly).

Create integer constants for the beginning temperature (0), the ending temperature (20), the freezing point (32), the value of five (5), and the value of nine (9). Format the Fahrenheit temperature numbers to 1 decimal place. Use tabs ( ) to align the columns.

There is no input and no validation for this program.

Example Run #1:
(bold type is what is entered by the user)

Centigrade Fahrenheit
0 xx.x
1 xx.x
2 xx.x
3 xx.x
4 xx.x
5 xx.x
6 xx.x
7 xx.x
8 xx.x
9 xx.x
10 xx.x
11 xx.x
12 xx.x
13 xx.x
14 xx.x
15 xx.x
16 xx.x
17 xx.x
18 xx.x
19 xx.x
20 xx.x

The example run shows EXACTLY how your program input and output will look.

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!