Question: Write program that gets an integer, n, from the user and then prints n repetitions of the pattern: an A, some Bs, then a C.
Write program that gets an integer, n, from the user and then prints n repetitions of the pattern: an A, some Bs, then a C. Each new repetition has one less B than the pattern before it. The first pattern has n Bs. For n=4, the program should print ABBBBCABBBCABBCABC
Please write comment explain how the logic will work.
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
