Question: The Program Design a program that allows the user to enter the total rainfall for each of the 12 months into an array. The program

The Program

Design a program that allows the user to enter the total rainfall for each of the 12 months into an array. The program should calculate and display the total rainfall for the year, the average monthly rainfall, and the months with the highest and lowest amounts.

Screenshot

Here's an example of what you program should look like.

Enter rainfall for January: 12

Enter rainfall for February: 12

Enter rainfall for March: 12

Enter rainfall for April: 10

Enter rainfall for May: 12

Enter rainfall for June: 14

Enter rainfall for July: 14

Enter rainfall for August: 12

Enter rainfall for September: 12

Enter rainfall for October: 12

Enter rainfall for November: 12

Enter rainfall for December: 10

High rainfall is: 14

Low rainfall is: 10

Total rainfall is: 144

Average rainfall is: 12

Please use arrays for this assignment, even though this program could be written without arrays. You should use a bubble sort to determine high and low rainfall amounts.

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Programming Questions!