Question
IN C LANGUAGE Write a program to display a table of Centigrade temperatures and their corresponding Fahrenheit temperatures. The Centigrade temperatures will range from 0
IN C LANGUAGE
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 (\t) 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
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started