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

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 Databases Questions!