Question: C++ Program Write a single program that uses two nested loops to display Patterns A and B. Your first nested loop will display Pattern A,
C++ Program
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.
See Sample Runs Below.
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
