I am really having a problem with developing the "initialization; condition; update" part of my for loop in my mario (less comfortable) code could anyone help me with understanding what to input


Well, why is a loop necessary in the first place? To repeat a bunch of steps. What steps can building a pyramid be broken down into? Building its layers (lines). How many lines tall should the pyramid be? The user supplies that number. So maybe, condition of your of your loop should be i < n, where i is the counter and n is the height supplied by the user. So like, for (int i = 0, i < n, i++) { do some stuff } This will do some stuff n times, because i is incremented by 1 at the end of each run and will eventually reach n, ending the loop.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .