Question: Create four variables: 1. An input variable which will control the loop 2. An incrementing variable which keeps count of the numbers entered 3. A

Create four variables: 1. An input variable which will control the loop 2. An incrementing variable which keeps count of the numbers entered 3. A variable to keep a running sum of the numbers entered. 4. A variable to calculate the numeric average of the numbers entered. The first three variables will be integers (int). The 4^th will be float. You will prompt the user to enter an integer and tell him/her to enter 0 or less to quit. As values are entered, check to see if it's greater than zero to determine if you need to add the value to the running sum and to add one to the counter. The following figure is an actual run of my version of the program. Enter an integer value, 0 or less to quit: 3 Enter an integer value, 0 or less to quit: 3 Enter an integer value, 0 or less to quit: 4 Enter an integer value, 0 or less to quit: 0 You entered 3 integers. The sum of these integers is 10 and the average of these numbers is 3.33333
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
