The basic formula is MAX - MIN + MIN. So something like this would work:
int num_between_x_and_y = (rand() % (X - Y)) + Y;
Type: Posts; User: itsme86
The basic formula is MAX - MIN + MIN. So something like this would work:
int num_between_x_and_y = (rand() % (X - Y)) + Y;