c#数组,手机号随机数抽奖

using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace _20
{
    class Program
    {
        static void Main(string[] args)
        {
            //20.输入手机号码个数,根据手机号码个数创建数组。做抽奖活动。

            Console.Write("请输入手机号码个数:");
            int a = int.Parse(Console.ReadLine());
            string [] shuzu = new string [a];
            for (int i = 0; i <a; i++)
            {
                Console.Write("请输入第" + (i + 1) + "个手机号:");
                shuzu [i] = Console.ReadLine();
            }
            Console.WriteLine("所有手机号码已经输入完成,3秒后开始抽奖");
            System.Threading.Thread.Sleep(3000);
            Console.Clear();
            for (int i = 0; i >= 0;i++ )
            {
                Random ran = new Random();
                int q = ran.Next(a);
                Console.WriteLine(shuzu[q]);
                System.Threading.Thread.Sleep(10);
                Console.Clear();

                    
            }
            Console.ReadLine();
        }
    }
}

posted @ 2016-02-17 16:04  什么玩楞啊,我叫旺仔  阅读(390)  评论(0编辑  收藏  举报