T
terryspencer2003
I have been using the following formula to generate a random number
between 1 and 42. I have made my UpperBounds = 42 and my LowerBounds
= 1. I ran 1,000 iterations and in several instances, the random
number generated equaled 43. How is this? Is there an error in my
logic?
RandomNumber = Int((UpperBounds - LowerBounds) + 1)* Rnd + LowerBounds
TS
between 1 and 42. I have made my UpperBounds = 42 and my LowerBounds
= 1. I ran 1,000 iterations and in several instances, the random
number generated equaled 43. How is this? Is there an error in my
logic?
RandomNumber = Int((UpperBounds - LowerBounds) + 1)* Rnd + LowerBounds
TS