View Single Post
Old Feb 27th, 2006, 9:05 PM   #5
Sane
Programming Guru
 
Sane's Avatar
 
Join Date: Apr 2005
Location: Waterloo, Ontario
Posts: 2,035
Rep Power: 6 Sane will become famous soon enough
Send a message via MSN to Sane
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".
Sane is offline   Reply With Quote