How do you generate random numbers?
Hummm.....appearantly you didn't read the Board FAQ. It is at a link at the bottom of this page.
What you want is the rand() function. You can read about it here or just do a search for previous threads about this topic.