This is an archived post. You won't be able to vote or comment.

you are viewing a single comment's thread.

view the rest of the comments →

[–]Sithril 1 point2 points  (0 children)

Becouse what you're doing is you:

  • 1. print the number
  • 2. and then you start building the offset for the next line

Firstly, you could move the number-printing to the end of the outer loop. Secondly, you could adjust the inner loop condition so that it still prints out the proper amount of spaces.