Question: Write a program that reads integers using a loop and finds the largest number entered, the total of the numbers, and counts how many numbers

Write a program that reads integers using a loop and finds the largest number entered, the total of the numbers, and counts how many numbers were entered. Assume input ends with the number 0 . Make sure to have variables to store the current maximum number and the total and the number of integers. Assign the first number entered to the maximum variable. Compare each number with the current maximum number. If the number entered is greater than the current maximum, then assign the number entered to the current maximum variable. Sample run: Enter numbers: 36263410 [Press enter] The number of integers entered is 7. The largest number is 6. The total is 25
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
