Write a program that analyzes a months worth of


Project Summary

Write a program that analyzes a month's worth of temperatures.

Instructions:

Read 30 temperatures (ints) from a file named "temperatures.txt" representing the high temperature for the last 30 days. The temperatures will be separated by white space in the file. Store the values from the file into an array. Do not sort the array.

Provide a menu for the user to choose which statistics they want.

The user should be able to choose any of these functions until they enter X to exit:

- O Output the temperatures, 10 per line.
- H Calculate the highest temperature
- A Calculate the average temperature to one decimal place
- N Count the number of days that the temperature was above a value entered by the user. For example, if the user enters 70, you would count how many temperatures were above 70.

Implement the menu using a switch statement inside a while loop.

The program should work for any file containing 30 temperatures.

Solution Preview :

Prepared by a verified Expert
C/C++ Programming: Write a program that analyzes a months worth of
Reference No:- TGS01179469

Now Priced at $20 (50% Discount)

Recommended (97%)

Rated (4.9/5)