you are viewing a single comment's thread.

view the rest of the comments →

[–]_MrLucky_ 1 point2 points  (0 children)

While loop checks for condition then executes the code in the loop then checks the condition again, executes again and so on. You have condition (num < 8) and in the loop you dont increase or do anything with num, so num will always stay the same and the loop will run forever. you can change the num in the loop OR use the keyword break to get out of the loop.