|
-
August 27th, 2010, 07:12 AM
#1
Help with generating random number
If I want to generate 10 random numbers ranging from 0 to 9, is it possible to have 10 different numbers every time? For example, every time they should be like this, 1,3,4,9,0,2,8,7,5,6 without duplicate. I tried srand and rand but it looks like it doesn't work. They simply will generate duplicate numbers. Thanks for your inputs.
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|