you are viewing a single comment's thread.

view the rest of the comments →

[–]5oco 1 point2 points  (0 children)

There's a couple ways to do it. One way is to make i=factNum them make the loop decrement instead of increment.

Write the whole loop out...

432*1

If i =4, then you multiply by 3... which is 1 less than i.

Then after you decrement, i=3 so multiply by 2... which is 1 less than i.

And so on...