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
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