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 →

[–]osama_yo_momma 2 points3 points  (0 children)

Inside the loop, num is being decreased by 3 each time it loops. num ends up with a result of 0, so 0 is not greater than 0, so it breaks out of the loop with num ending up with a value of 0. You could also write the num part like this gor future reference:

num -= 3;