Re: random numbers
- Posted by c.k.lester <euphoric at ck?ester.?om> Nov 22, 2007
- 597 views
Jason Gade wrote: > I would only change it slightly: > }}} <eucode> > s = {1,2,3,4,5,6,7,8,9,...52} > n = repeat(0, 52) > for t=1 to 52 do > r = rand(length(s)) -- grab a random position > n[t] = s[r] -- add it to our new sequence > s = s[1..r-1] & s[r+1..$] -- remove from available numbers > end for > </eucode> {{{ Good eye! :)