The Rnd function returns a value less than 1 but greater than or equal to zero.
The value of number determines how Rnd generates a random number:
For any given initial seed, the same number sequence is generated because each successive call to the Rnd function uses the previous number as a seed for the next number in the sequence.
Before calling Rnd, use the Randomize statement without an argument to initialize the random-number generator with a seed based on the system timer.
To produce random integers in a given range, use this formula:
Int((upperbound - lowerbound + 1) * Rnd + lowerbound)
Here, upperbound is the highest number in the range, and lowerbound is the lowest number in the range.
Note To repeat sequences of random numbers, call Rnd with a negative argument immediately before using Randomize with a numeric argument. Using Randomize with the same value for number does not repeat the previous sequence.
tina001in < tina001in%40yahoo.com">tina001in
yahoo.com> wrote: I am creating a Number generation software
This software creates 15 random nos. It creates such 100000 sets. Some
where all the 15 nos are repeated which should not be allowed. can you
guide me how to check whether repetition is happening. My current code
takes hours to check even 50000 sets, it should not take more than 1
hour to complete the entire task.
Thank You.
[Non-text portions of this message have been removed]
.