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

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

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!