Question: Fill in the main method below. Your program should prompt the user to enter (integer) values, and will add them up as it goes, displaying
Fill in the main method below. Your program should prompt the user to enter (integer) values, and will add them up as it goes, displaying the total after each entry. If the total reaches 100 or more, then your program should display "Too much" (instead of the total) and stop. Here is an example: Enter a value: 50 Total is 50 Enter a value: 25 Total is 75 Enter a value: 20 Total is 95 Enter a value: 5 Too much import java.util.Scanner: public static void main(String[] args) { Scanner s = new Scanner(System.in)
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
