>>for a match of 3 numbers in 6, so the user should still enter a ticket of 6 numbers
That is what I was missing. I was not making the other 3 possible numbers available to be checked for a match. I...
Type: Posts; User: usb
>>for a match of 3 numbers in 6, so the user should still enter a ticket of 6 numbers
That is what I was missing. I was not making the other 3 possible numbers available to be checked for a match. I...
I created a C program that provides stats on random number (lotto) matches. The calculated probability of a full match equals the programs average output for a full match, but a partial match, like...
I used mod to generate the numbers from a specific max as when I used rand(). It works, however one of the comments posted seemed to state that using mod is not the best way.
In both rand() and...
I found and downloaded this random number generator: mt19937int.c
This is a step beyond my scope.
I deleted main and renamed the file to random.h
In my program I entered: #include...
To jim mcnamara and Brian:
At the start of the code I run srand((unsigned)time(NULL)); once. It never runs again.
To Thantos:
I am using mod. This is the function:
int roll (int max) {
...
I created a lottery-type program that you pick 6 numbers from a given range.
The program randomly selects 6 numbers from the same range and determines how many tries it takes to choose 6 numbers...