2018-12-27幸运抽奖(3)

(1) . 输入用户名和密码,系统产生4位随机数作为卡号。
(2) . 注册成功,显示注册信息并修改注册标识为true

static void Main(string[] args)
    {
        int max = 99999;
        int min = 1000;
        Random rd = new Random();
        rd.Next(min, max);
        int a = 0;
        string user ="";
        string key ="";
        string b = "";
        Console.WriteLine("*****欢迎进入奖客富翁系统*****");
        Console.WriteLine("           1.注册");
        Console.WriteLine("           2.登录");
        Console.WriteLine("           3.抽奖");
        Console.WriteLine("******************************");
        Console.WriteLine("请选择菜单:");
        a = Convert.ToInt32(Console.ReadLine());
        switch (a)
        {
            case 1:
                Console.WriteLine("[奖客富翁系统>注册]");
                Console.WriteLine("请填写用户注册信息:");
                Console.WriteLine("用户名:");
                user = Console.ReadLine();
                Console.WriteLine("密码:");
                key = Console.ReadLine();
                Console.WriteLine("注册成功,请记好你的会员卡号");
                Console.WriteLine("用户名\t\t密码\t\t会员卡号");
                Console.WriteLine("{0}\t\t{1}\t\t{2}", user, key,rd.Next(min ,max));
                Console.WriteLine("继续吗?(y/n)");
                b = Console.ReadLine(); 
                break;
            case 2:
                Console.WriteLine("[奖客富翁系统>登录]");
                break;
            case 3:
                Console.WriteLine("[奖客富翁系统>抽奖]");
                break;
        }
        Console.WriteLine("继续吗?(y/n)");
        b = Console.ReadLine();
        switch (b)
        {
            case "n":
                Console.WriteLine("系统退出,谢谢使用");
                break;
            case "y":
                Console.WriteLine("");
                break;
        }
        Console.ReadKey();
    }

你可能感兴趣的:(2018-12-27幸运抽奖(3))