I need to generate a random number between a range, say 1 - 6. I have looked at rand() and it returns random numbers in the integer range. Can anyone tell me how to generate a random number within a certain range.

Thanks lg

Printable View

- 08-13-2005lggrandom number in range
I need to generate a random number between a range, say 1 - 6. I have looked at rand() and it returns random numbers in the integer range. Can anyone tell me how to generate a random number within a certain range.

Thanks lg - 08-13-2005Salem
Read the FAQ

- 08-13-2005quzah
Thread should be titled: "random number in FAQ".

Quzah. - 08-14-2005kermitQuote:

I need to generate a random number between a range, say 1 - 6. I have looked at rand() and it returns random numbers in the integer range. Can anyone tell me how to generate a random number within a certain range.