Quote Originally Posted by Xavier_Firbold View Post
x = (rand() * number of tickets) ;
rand() calls from zero through upper, so this hilariously shows exactly how the problem may have happened in the first place, and isn't in fact any demonstration of how you would fix it.