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
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started