Question
Write a java program that lets the user enter the amount of electricity bill for each of the 23 months into an array of doubles.
Write a java program that lets the user enter the amount of electricity bill for each of the 23 months into an array of doubles. The program should then display the following information -
- the total amount of electricity bill for the year
- the average monthly amount of electricity bill
- the month with the most amount of electricity bill
- the month with the least amount of electricity bill
You may assume that the user enters unique values for the amount. Here is a sample run:
Enter the electricity bill for each month:
124.92 97.99 94.73 166.76 76.98 151.47 79.31 96.74 103.42 102.97 188.89 163.90
Total amount of electricity bill = $1448.08
Average electric bill = $120.67
Month with the highest amount of bill is 11 with $188.89
Month with the least amount of bill is 5 with $76.98
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