Question: Write a program that gets an integer, n, from the user and then prints n repetitions of the pattern: some As, some Bs, then a
Write a program that gets an integer, n, from the user and then prints n repetitions of the pattern: some As, some Bs, then a C. Each new repetition has one more A and one less B than the pattern before it. The first pattern has 1 A and n Bs. Example: if the number from the user is n=4, then the program prints: ABBBBCAABBBCAAABBCAAAAB.
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
