08-25-2025, 12:04 AM
I was curious to know how many random numbers were generated
by the Randomize function, so I wrote this short prog:
by the Randomize function, so I wrote this short prog:
Code: (Select All)
'set start point
DefLng C: DefDbl F, L, D
startat = Int(Rnd * 1000) ' set random Start point in the "list"
For a = 1 To startat: n = Rnd: Next ' generate each random number in turn
First = Rnd: Print First ' set this random number as start point
While First <> last ' wait for the next time this number is found
count = count + 1
last = Rnd ' read each random number
Print count; last; " "; ' show random number and how many random numbere were read
Wend
{I found it interesting, anyway!)
Of all the places on Earth, and all the planets in the Universe, I'd rather live here (Perth, Western Australia.) 
Please visit my Website at: http://oldendayskids.blogspot.com/

Please visit my Website at: http://oldendayskids.blogspot.com/

