|
You first have to declare "num" with an initial value. If you are trying to add num to itself plus one, it must first have a value.
Try putting "num = 0" at the beginning of your program.
As well, "num += 1" is a more well-formed alternative to "num = num + 1".
|