Write a modular program that analyzes a year's worth of rainfall data. In addition to main, the program should have a getData function that accepts the total rainfall for each of 12 months from the user, and stores it in a double array. It should also have four value returning functions that compute and return to main the totalRainfall, averageRainfall, driestMonth, and wettestMonth. These last two functions return the number of the month with the lowest and highest rainfall amounts, not the amount of rain that fell those months. Notice that this month number can be used to obtain the amount of rain that fell those months. Input validation: Do not accept rainfall amounts less than 0. This information should be used either by main or by a displayReport function called by main to print a summary rainfall report similar to the following:
2010 Rain Report for Neversnows County
Total rainfall: 23.19 inches
Average monthly rainfall: 1.93 inches
The least rain fell in January with 0.24 inches
the most rain fell in April with 4.29 inches
We can only help if we've seen where you've made a mistake. You haven't written anything, we can't help with anything. If you do the work yourself and come accross problems, we can tell you where you went wrong, but we don't do homework.