1. ## Help!!!!!!!!!!!!!!

*crying* is it possible to make a max number for the rand comand its going to high!!!!! *crying*

2. yes if you do this:

Code:
`rand() % 10;`
it will go from 0 to 10

if you do this:

Code:
`(rand() % 10) + 3;`
it will go from 3 to 10

3. well....almost:

rand() % 10 will return numbers 0 - 9 inclusive;

and (rand % 8) + 3 will return return numbers 3 - 10 inclusive;

4. this is kinda stupid but wat does inclusive mean
and it din't work

5. inclusive = numbers from 0 to 9 and including 0 and 9.

Why doesn't it work? Does it compile?

Did you include stdlib? I think the rand function is in ther

6. it din't minimize the rand cout i wanted it between 140 - 160 but it still went higher no as high but it went to about 700

7. Well, lets see the way you have it written.

But lets simplify it first:

Try making a for loop that sends a random number between 140 and 170 to cout, then a '\t'. Make it iterate 50 times, and post the source if it does not do what you want it to.

8. if you want random values in a range try the formula

Code:
`a + rand() % (b-a+1)`
where a = lower range
b = upper range

In your case a= 140, b = 160

9. Just use the random func from the FAQ.

Code:
```int random(int low, int high) { // my random function
srand(time(NULL));
return low + rand()%(high-low+1);
}```