for a laugh im writing a random lottery number generator
but what i have noticed is that every few draws im only getting 5 numbers. I have gone over things a few times and guess its something to do with when the same number is drawn
im not sure about these lines:
can somebody please give me some advice on how to handle something like this.
this seems to work, no duplicate numbers, only 5, tell me what you think
dont know why i was adding after changing the random number again
is there a more efficient way of doing this?
Why cant i reply to my thread? i can only edit the original.
Irish lottery has a few draws with different number schemes, casue the Irish do things differently lol!
here is the entire program, seems to work well, though sometimes the exit isnt ending the menu loop. but i will look at it again
I thought the numbered balls ran 1...49inclusive.
Are you getting any numbers duplicated? Remember that randomness entails duplicates If you choose two random numbers there is a chance that you will get a duplication. Your test for duplicates doesn't guarantee six unique numbers; it is quite possible for the same number to come up thrice. In which case you won't get six distinct numbers.
Don't sweat petty things, or pet sweaty things. But cuddle this tiny ad:
how do I do my own kindle-like thing - without amazon