public class Demo { public static void main(String[] args) { // 有百分之一的几率能够中奖 for (int i = 0; i < 100; i++) { if (Math.random() > 0.99) { System.out.println("恭喜你中奖了"); } } } }
抽奖代码实现
猜你喜欢
转载自www.cnblogs.com/LangKeZ/p/12148625.html
今日推荐
周排行