Question
Write a program that converts a Celsius temperature to its Fahrenheit equivalent (see textbook Page146 #12 ). The formula is given below: C++ fahrenheit =
- Write a program that converts a Celsius temperature to its Fahrenheit equivalent (see textbook Page146 #12). The formula is given below: C++
fahrenheit = 9/5 celsius + 32
The program will prompt the user to enter a number for the temperature in degrees Celsius and will read the number. It will calculate the equivalent Fahrenheit temperature using the formula given above. It will display an appropriate main title and then output both the value of the Celsius temperature and its Fahrenheit equivalent. The Fahrenheit temperature will be output formatted to one decimal place.
Note: think carefully when writing the statement in C++ to perform the conversion using the formula above.
Verify your program by calculating by hand, and then by using your program, the Fahrenheit equivalent of the following test data:
- 0 degrees Celsius
- 22 degrees Celsius
- 37 degrees Celsius
- 100 degrees Celsius
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