3月13日 抽奖活动
生活随笔
收集整理的這篇文章主要介紹了
3月13日 抽奖活动
小編覺得挺不錯的,現在分享給大家,幫大家做個參考.
//輸入n個手機號,滾動號碼,5秒后停止,做抽獎活動;Console.Write("輸入手機號的個數");int a = int.Parse(Console.ReadLine());string[] shoujihao = new string[a];for (int i = 0; i < a; i++){Console.Write("輸入第" + (i + 1) + "個手機號碼:");shoujihao[i] = Console.ReadLine();}Console.WriteLine("所有號碼輸入完畢,請按回車鍵滾動");Console.ReadLine();Random ran = new Random();for (int i = 0; i > -1; i++){int aa = ran.Next(a);Console.Clear();Console.WriteLine(shoujihao[aa]);System.Threading.Thread.Sleep(100);if (i == 50){//Console.Clear();//Console.WriteLine("123");break;}}Console.ReadLine();
?
轉載于:https://www.cnblogs.com/dongqiaozhi/p/5272325.html
總結
以上是生活随笔為你收集整理的3月13日 抽奖活动的全部內容,希望文章能夠幫你解決所遇到的問題。
- 上一篇: CUDA编程-gt;CUDA入门了解(一
- 下一篇: 励志篇