Greg Charles wrote:Yep, that's it. The old infinite loop. Your problem was decrementing the loop index inside the loop. It's generally a bad idea to play around with the loop index like that, and now you know why!
haha i can't believe i did that!
If anyone is wondering what the heck i was thinking of. I was thinking that i wanted the for loop to go until i had printed out 52
cards, and if a certain card generated by a random number had already been generated i wanted the for loop to go again like nothing had happend. Oh well i think i would be better off using a while loop and just incrementing a variable everytime a card is printed out.