Question: c#...For this exercise you are asked to write an application that allows the user to input monthly rainfall amounts (in millimetres) for one year. These
c#...For this exercise you are asked to write an application that allows the user to input monthly rainfall amounts (in millimetres) for one year. These rainfall amounts provided by the user should be stored in an array. You should also create a second array holding the names of each month. Once the user has input rainfall amounts for all 12 months, your program should report the month with the maximum rainfall and the average rainfall per month of the year. If there are ties for the maximum you may display any of the months with the maximum rainfall. Then it should ask the user to press enter to exit the program. Here is an example of what your program should look like:
What is the monthly rainfall for January (in millimetres) : 160
What is the monthly rainfall for February (in millimetres) : 175
What is the monthly rainfall for March (in millimetres) : 135
What is the monthly rainfall for April (in millimetres) : 90
What is the monthly rainfall for May (in millimetres) : 100
What is the monthly rainfall for June (in millimetres) : 70
What is the monthly rainfall for July (in millimetres) : 65
What is the monthly rainfall for August (in millimetres) : 40
What is the monthly rainfall for September (in millimetres) : 30
What is the monthly rainfall for October (in millimetres) : 90
What is the monthly rainfall for November (in millimetres) : 100
What is the monthly rainfall for December (in millimetres) : 130
Maximum rainfall is in February with 175mm
The average rainfall for the year is 98.75mm
Press enter to exit
Your program should accept decimals and handle them well (e.g 185.73mm). It should also reject non-numeric and negative input
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
