Originally posted by Bigj0410
need help plz
Collapse
X
-
Originally posted by Bigj0410u mean "rand() % 10 + 1;"?
variable = rand() % 10 + 1;
gives variable (I dont' remember what they used) a random value.
The mod (%) 10 is what you're going to be interested in next - this returns a number between 0 and 10. So you just have to change that to give you one between 1 and 100.Comment
-
Originally posted by sicarieWell, I was talking more how they assign it.
variable = rand() % 10 + 1;
gives variable (I dont' remember what they used) a random value.
The mod (%) 10 is what you're going to be interested in next - this returns a number between 0 and 10. So you just have to change that to give you one between 1 and 100.Comment
Comment