puffthemagicdragon
New member
- Local time
- Today, 09:00
- Joined
- Mar 17, 2009
- Messages
- 9
I need to add a facility to my application which will generate random numbers which I can then append to a table. The output must be five numbers between 1 & 59 and each must be different (i.e. must not repeat a number in a line).
First: Int((59-1+1)*Rnd()+1) produces the right number range, but after (literally) days of trying I can't find a way to make sure each one is distinct from the others in each line.
I suspect the answer might be to write each number into an array and then loop back to check whether the next is different, but am unsure how to code this, much less how the get the result out of the array
Even a tiny bit of help in the right direction will be much appreciated!
First: Int((59-1+1)*Rnd()+1) produces the right number range, but after (literally) days of trying I can't find a way to make sure each one is distinct from the others in each line.
I suspect the answer might be to write each number into an array and then loop back to check whether the next is different, but am unsure how to code this, much less how the get the result out of the array

Even a tiny bit of help in the right direction will be much appreciated!