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
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started