Quantcast
Channel: AutoIt v3 - General Help and Support
Viewing all articles
Browse latest Browse all 12506

[SOLVED] Random number exclusion?

$
0
0
How do I select a random number between a min and a max, and then after picking that number select another random number between the same min/max excluding the first number I picked?

Example: I want to select 5 random numbers between 1 and 12, and each selection can not be the same. If I select the number 6 the first time I do not want it to be possible to select the number 6 again.

The only way I can see it being done is to compare the later results with the former results and if they are the same, run the random number generator again.. but then is it still truely random? I am no mathmatician so I have no idea... but it does need to be completely random. Does picking an already picked number, tossing it back, and selecting again count as random?

Viewing all articles
Browse latest Browse all 12506

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>