Question: C++ 3) Write an interactive C++ program whose input is a series of 12 temperatures from the user. It should write out on file tempdata.dat

C++  C++ 3) Write an interactive C++ program whose input is a

3) Write an interactive C++ program whose input is a series of 12 temperatures from the user. It should write out on file tempdata.dat each temperature as well as the difference between the current temperature and the one preceding it. The difference is not output for the first temperature that is input. At the end of the program, the average temperature should be displayed for the user via cout. For example given the input data 34.5 38.6 42.4 46.8 51.3 63.1 60.2 55.9 60.3 56.7 50.3 42.2 file tempdata.dat would contain 34.5 38.6 4.1 42.4 3.8 46.8 4.4 51.3 4.5 63.1 11.8 60.2 -2.9 55.9 -4.3 60.3 4.4 56.7 -3.6 50.3 -6.4 42.2 -8.1 Be sure to use proper formatting and appropriate comments in your code. The input should be collected through appropriate prompts, and the output should be labeled clearly and formatted neatly 10 points

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!