result = rand(); // generate random value from 0 to 32767
result = result/1000;
But the switch-case on your code considers only 10 options (0 to 9), which means that would be expected a lot of raffles without any update on the lottery display, something in the range of 1/3 ( ~10/32 )