Question: Write a single program that uses two nested loops to display Patterns A and B. Your first nested loop will display Pattern A, and then

Write a single program that uses two nested loops to display Patterns A and B. Your first nested loop will display Pattern A, and then write a second nested loop to display Pattern B. Your program should prompt the user to enter the Height of the pattern. Your program should also include a loop that lets the user repeat this calculation until the user says he or she is done.

Input Validation for Height: Do not accept zero or a negative value for height. Also, control for input failure. That is if the user; enters a letter instead of a numeral, your program should resolve the failure and prompt the user to re-enter the height.

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!