(Practice)
a. Write a C++ program that first displays the following prompt:
Enter the temperature in degrees Celsius:
Have your program accept a value entered from the keyboard and convert the temperature entered to degrees Fahrenheit, using this formula:
Fahrenheit = (9.0 / 5.0) × Celsius + 32.0
Your program should then display the temperature in degrees Fahrenheit with an appropriate message.
b. Compile and run the program written for Exercise a. To verify your program, use the following test data and calculate the Fahrenheit equivalents by hand, and then use your program to see whether you get the same results:
Test data set 1: 0 degrees Celsius
Test data set 2: 50 degrees Celsius
Test data set 3: 100 degrees Celsius
When you’re sure your program is working correctly, use it to complete the following chart:
Celsius | Fahrenheit |
45 |
|
50 |
|
55 |
|
60 |
|
65 |
|
70 |
|
We need at least 10 more requests to produce the solution.
0 / 10 have requested this problem solution
The more requests, the faster the answer.