put Num1 -= 1
after the first loop.
Edit and also x -=1 on the inside loop will find x as zero on the next num1 loop.