Rand()

Posts 1–5 of 5 · Page 1 of 1
Rand()
Well Im using the Rand(); function and I have one question
How I make the rand just generates a number between 0-9?
Quote Originally Posted by alvaritos View Post
Well Im using the Rand(); function and I have one question
How I make the rand just generates a number between 0-9?
Code:
rand()%9
agffddjhhgfg
Solved thanks..
Heres a link that goes over some better ways to implement rand so you dont always get low or high order bits.

Code:
http://eternallyconfuzzled.com/arts/jsw_art_rand.aspx
Posts 1–5 of 5 · Page 1 of 1

Post a Reply

Tags for this Thread

None

Talk with us