Question: Write a program that will ask users to enter 5 positive numbers, one at a time using a loop. If the user enters a positive

Write a program that will ask users to enter 5 positive numbers, one at a time using a loop.
If the user enters a positive number, the program will record it in a list.
If the user enters 0 or a negative number, the program will ask the user to enter a number
again, and it will not count as one of the 5 positive numbers.
At the end, the list will alwavs contain 5 positive numbers, and the proaram will print the list.
Write a program that will ask users to enter 5

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 Programming Questions!