Hi again,
I read in the C++ book that rand() function returns a random number and that in order to get a random number in a range that you want, the formula is:
1-6,And that rand() % 6 would return 0-6, and then the +1 would make that 1-7 though?Code:1 + rand() % 6
Also, if I runit never returns 13, only 0-12, but can't you get 13 if you divide the right number as the remainder?Code:rand() % 13
Thanks again.