Quote Originally Posted by laserlight View Post
You're using num1 and num2 before initialising them. I suggest initialising them to the return value of rand() % 20.
Yes, you need a do .. while rather than a while loop here.