+ 5
Lotto random number generator
I'm writing a program to generate random lotto numbers I adapted a bit of code from Memphis Reigns ( thanks Memphis) I'm a bit stuck when it comes to checking if the random number has already been chosen Should I put a conditional loop in? I know it's been done before but thought it would be interesting
3 Respostas
+ 4
You can set all not-generated numbers in a list then you generate a number i from 0 and n where n is current length of list for obtain the generated number list[i] ... After this, you must remove the number from the list and repeat
+ 2
Thanks for that Xan