Question: Write the IPO & Pseudocode: A program is required that prompts the user for a number between 1 and 20. The prompt should also tell

Write the IPO & Pseudocode:

A program is required that prompts the user for a number between 1 and 20. The prompt should also tell the user enter 0 to end. The program will then print a series of asterisks to represent the number. If the user enters 0, the program stops. If the user enters anything larger than 20 or less than zero, an invalid input will be reported and the program waits for the next input. The asterisk should be printed using a loop. You can develop a function called prinrStar(n) that gets n and prints n asterisk.

Sample run:

Enter a number between 1 and 20. Enter 0 to end: 5 ***** Enter a number between 1 and 20. Enter 0 to end: 99 invalid input!

Enter a number between 1 and 20. Enter 0 to end: 13 ************* Enter a number between 1 and 20. Enter 0 to end: 0 Thanks and bye!

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!