Hi, I got the following line from the FAQ:

rc = (rand() % (max - min + 1) + min);

I know this does work but I'd rather know why my code is working. I'm not very mathmatically minded so if anyone could give me a bit of a walkthrough that'd be great.

Thanks