Question: Write a JAVA program to calculate the total amount, the maximum and the minimum donations an organization got the last year. It uses a loop

Write a JAVA program to calculate the total amount, the maximum and the minimum donations an organization got the last year. It uses a loop to ask the user to enter a series of donation. The end of input is-1. Then the program calculates and displays the total amount, the maximum and the minimum donations for the organization. Below is a sample of the input and output.

Please enter the donation: (-1 ends the input):100

Please enter the donation: (-1 ends the input):200

Please enter the donation: (-1 ends the input):-1

The total amount of donations is 300, the maximum donation is 200, and the minimum donation is 100.

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!