Question: Weather Stats Write a program that defines a structure name WeatherStats to store the following weather data for a particular month having the following member
Weather Stats
Write a program that defines a structure name WeatherStats to store the following weather data for a particular month having the following member variables or fields:
TotalRainfall as double
TotalSnowfall as double
HighTemperature as double
LowTemperature as double
AverageTemperature as double
The program's main function must have an array of structures to hold weather data for an entire year. When the program runs, have it ask the user to enter data for each month. The average temperature for the month must be calculated as:
HighTemperature LowTemperature
WARNING: Do not allow the user to enter data for the average your score will be significantly reduced if you do not follow this requirement.
Once the data are entered for all the months, the program should calculate and display the average monthly rainfall, the total rainfall for the year, average monthly snowfall, the total snowfall for the year, the highest and lowest temperatures for the year and the months they occurred in must display all occurrences and the average of all the monthly average temperatures.
Input Validation: Only accept temperatures within the range between and degrees Fahrenheit. Only accept rainfall and snowfall amounts greater than or equal to zero.
To be submitted:
C source code file cpp file of your program
Step by Step Solution
There are 3 Steps involved in it
1 Expert Approved Answer
Step: 1 Unlock
Question Has Been Solved by an Expert!
Get step-by-step solutions from verified subject matter experts
Step: 2 Unlock
Step: 3 Unlock
