Question: Section 3: Using Java Enter the comment with the section title. Use a while loop to process user entered numbers. Inform the user to enter
Section 3: Using Java Enter the comment with the section title. Use a while loop to process user entered numbers. Inform the user to enter a positive number to be added to the total or -1 to end. With each iteration of the loop, add the user entered value to a running total. End the loop when the user enters -1 and do not add that value to the running total. Once the loop ends, print the total of the numbers entered, (excluding the sentinel value -1.) Define the appropriate variables needed.
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
