|
Re: populate array with random nonrepeating #'s
Should it not just be as simple as checking storing the last number to be generated and stored, then checking it agaisnt the new number to see if it is the same if it is then generate a new number?
Sorry, re-read you may want to store each randomly generated number in an array then check each new number against those in the array.
im confusing myself lol
Chris
__________________
Steven Skiena - Algorithms
,[->+>+<<]>>[-<<+>>]>++++++++[-<++++++++>]<+[-<->]>+<<[[-]+++++++++++++++.[-]>]>>[+++++++++.[-]],
brainf**k -- It's such a pretty language
Last edited by Freaky Chris; Apr 29th, 2008 at 12:04 PM.
|