Write a program to read the date and average from the temps.txt file. Use a string data type for the date and a double for the average. The program should then convert the average (Fahrenheit) to Celsius. The conversion formula is subtract 32 from the average (Fahrenheit) and then multiply by five and divide by nine, e.g., (average –32) * 5 / 9. Output the date, the average temperature (Fahrenheit) and the Celsius temperature to a file named celsius.txt. Use the manipulators you have learned about in this chapter to format the output as shown in the sample below and print each number value to one decimal space.   1. Identify the following parameters to complete the specification above. Input parameters? Output parameters? Constant parameters? 2. Attach the input and output of a successful execution of your program below (Hint:Use the snipping tool to take screenshots):

C++ Programming: From Problem Analysis to Program Design
8th Edition
ISBN:9781337102087
Author:D. S. Malik
Publisher:D. S. Malik
Chapter8: Arrays And Strings
Section: Chapter Questions
Problem 5PE
icon
Related questions
Question
Write a program to read the date and average from the temps.txt file. Use a string data type for the date and a double for the average. The program should then convert the average (Fahrenheit) to Celsius.
The conversion formula is subtract 32 from the average (Fahrenheit) and then multiply by five and divide by nine, e.g., (average –32) * 5 / 9. Output the date, the average temperature (Fahrenheit) and the Celsius temperature to a file named celsius.txt.
Use the manipulators you have learned about in this chapter to format the output as shown in the sample below and print each number value to one decimal space.
 
1. Identify the following parameters to complete the specification above.
Input parameters?
Output parameters?
Constant parameters?
2. Attach the input and output of a successful execution of your program below (Hint:Use the snipping tool to take screenshots):
Expert Solution
trending now

Trending now

This is a popular solution!

steps

Step by step

Solved in 2 steps with 2 images

Blurred answer
Similar questions
  • SEE MORE QUESTIONS
Recommended textbooks for you
C++ Programming: From Problem Analysis to Program…
C++ Programming: From Problem Analysis to Program…
Computer Science
ISBN:
9781337102087
Author:
D. S. Malik
Publisher:
Cengage Learning