Question: Write a program that asks the user to insert positive integers. The program stops its execution when the user gives number 0. The program should

Write a program that asks the user to insert positive integers.

The program stops its execution when the user gives number 0.

The program should calculate the average of all given numbers (Zero number given for stop the execution, should be included in the avearge).

In case of negative values given by the user, these are rejected and the user should be re-asked for a new number.

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!