Question: 4.Please implement the program according in C to the requirements: (20 marks) Write a modular program that analyzes a year's rainfall data. (1) In addition

4.Please implement the program according in C to the requirements: (20 marks) Write a modular program that analyzes a year's rainfall data. (1) In addition to main,the program should have a getData(.....) function that accepts the total rainfall for each of 12 months from the user or data file, and stores it in a double array that is defined in main function. (2)It should also have other value returning functions that compute and return to main the averageRainfall (...), driestMonth(...), and wettestMonth (.....). (3) Test data and Running results are shown as Tunction. (2)It should also have other value returning functions that compute and return to main the averageRainfall....), driestMonth.), and wettestMonth...). (3) Test data and Running results are shown as following: Table 1 Rainfall in Hangzhou(mm) (Test data) 73. 84. 138.126.146.231.159. 155. 145.87.6047 4 2 2 2 6 1 4 8 2011 Running results on screen: 2010 Rain Report for Hanzhou
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
