I've been working on this for a while and feel stuck. I think that my "for" loops might be out of order or some other issue. Suggestions? Thanks
2 Answers
Looks like you have an extra for loop there, which will cause the entire thing to loop l
times when that's probably not what you intended.
-
-
@PatsyLin the one directly below the do-while loop. Commented Jan 16, 2022 at 11:44
-
in your code check the first for loop, why is the counter decreasing ?
why do you need 4 for loops?
to create the right aligned pyramid you need only 3 for loops.
external loop, to count from the top of the pyramid down to the base
first inner loop to print the dots or spaces, using --
second inner loop to print the #, using ++