not meaning to put out the bonfire but this can be solved with a formula without doing what is like a monte carlo analysis. monte carlo is not the best algorithm for calculating probability, over numbers 1-50 or so it isn't too bad but this is a logarithmic algorithm and could cause major problems if you reused the code in something else that wanted to know how many times to draw a million numbers from a hat for example.




Reply With Quote