星空网 > 软件开发 > ASP.net

C#双色球——简单抽取中奖号码

            int[] ss = new int[6];
            Random s = new Random();
            Console.WriteLine("双色球随机:");
            for (int i = 0; i < 6; i++)
            {
                bool b = true;
                int a = s.Next(1, 34);
                for (int j = 0; j < i; j++)
                {
                    if (a == ss[j])
                    {
                        b = false;
                        i--;
                    }
                }
                if (b)
                {
                    ss[i] = a;
                }
            }
            Console.Write("红球:\t");
            for (int i = 0; i < 6; i++)
            {
                for (int j = i; j < 5; j++)
                {
                    if (ss[i] > ss[j + 1])
                    {
                        int zhong = ss[i];
                        ss[i] = ss[j + 1];
                        ss[j + 1] = zhong;
                    }
                }
               
                Console.Write(ss[i] + "\t");
            }
             for (int i = 0; i < 7 ; i++)
            {
                int b = s.Next(1, 17);
                if (i == 6)
                {
                    Console.Write("蓝球:" + b + "\t");
                }
                else
                {
                    continue ;
                }
            }
            Console.ReadLine();




原标题:C#双色球——简单抽取中奖号码

关键词:C#

C#
*特别声明:以上内容来自于网络收集,著作权属原作者所有,如有侵权,请联系我们: admin#shaoqun.com (#换成@)。

数字税落地!亚马逊法国站全面上调佣金费率!:https://www.ikjzd.com/articles/104381
作价20亿美金,网易考拉将卖身阿里巴巴?:https://www.ikjzd.com/articles/104382
尚品网倒在资金压力下!奢侈品电商出路何在?:https://www.ikjzd.com/articles/104383
刚融资1.25亿美元 ,这个印度电商平台来华招商 !:https://www.ikjzd.com/articles/104384
2019年沃尔玛电商平台入驻最全卖家攻略:https://www.ikjzd.com/articles/104387
三个月内Best Sellers登顶,出门问问3大秘诀大公开!:https://www.ikjzd.com/articles/104388
天坛最佳攻略 天坛必玩景点:https://www.vstour.cn/a/408240.html
央视新址为什么会找回:https://www.vstour.cn/a/408241.html
相关文章
我的浏览记录
最新相关资讯
海外公司注册 | 跨境电商服务平台 | 深圳旅行社 | 东南亚物流