Well for one, you have the variable num.
You set it's value to 1 and never change it throughout the whole program.
You can just type 1 in instead of the variable num, but I suspect you've forgotten to increment it.
That may not be your error but we'd need the actual error and such to help...