just wondering, if I have the following code:
int randomNum = rand() % 18 + (-9);
will this create a random number from -9 to 9?
Anytime you have doubts, you can run a loop that gets 100 million random numbers with your original algorithm, get the lowest and highest values and see what happens.