How to generate a prize based on the prize's winning probability value (0-10000) in php? How to implement the algorithm? Among 10 prizes
认证高级PHP讲师
Every station understands what you mean, but the easier way to draw immediately is:
1.从0到100随即生成一个整数 2.设置中奖范围 比如10%的中奖率 那么1到10是中奖数字 3.然后根据抽中后的数字判断是几等奖
If you feel it is not safe, you can also increase the range, such as 0 to 10,000, and then set the winning range, etc.
Every station understands what you mean, but the easier way to draw immediately is:
If you feel it is not safe, you can also increase the range, such as 0 to 10,000, and then set the winning range, etc.