美文网首页
2018-12-27

2018-12-27

作者: zjh666 | 来源:发表于2018-12-27 09:41 被阅读0次

    bool b = true; while (b) { Console.WriteLine("*****欢迎进入奖客富翁系统"); Console.WriteLine(" 1.注册 "); Console.WriteLine(" 2.登录 "); Console.WriteLine(" 3.抽奖 "); Console.WriteLine("****************************"); Console.Write("请选择菜单"); int a = Convert.ToInt32(Console.ReadLine()); switch (a) { case 1: Console.WriteLine("奖客富翁系统>注册"); break; case 2: Console.WriteLine("奖客富翁系统>登录"); break; case 3: Console.WriteLine("奖客富翁系统>抽奖"); break; default: Console.WriteLine("你输入的格式有误"); break; } Console.WriteLine("你是否继续(yes/no)"); string c = Console.ReadLine(); if (c == "yes") { b = true; } else if (c == "no") { b = false; } else { Console.WriteLine("程序结束,系统退出"); Console.ReadKey(); }

     

     

    bool b = true; while (b) { Console.WriteLine("*****欢迎进入奖客富翁系统"); Console.WriteLine(" 1.注册 "); Console.WriteLine(" 2.登录 "); Console.WriteLine(" 3.抽奖 "); Console.WriteLine("****************************"); Console.Write("请选择菜单"); int a = Convert.ToInt32(Console.ReadLine()); switch (a) { case 1: Console.WriteLine("奖客富翁系统>注册"); break; case 2: Console.WriteLine("奖客富翁系统>登录"); break; case 3: Console.WriteLine("奖客富翁系统>抽奖"); break; default: Console.WriteLine("你输入的格式有误,程序退出"); break; } Console.WriteLine("请填写个人注册信息"); Console.WriteLine("用户名: "); string name = Console.ReadLine(); Console.WriteLine("密码: "); int h = Convert.ToInt32(Console.ReadLine()); int max = 99999; int min = 1000; Random rd = new Random(); ; Console.WriteLine("注册成功,请记好你的会员卡号"); Console.WriteLine("用户名\t密码\t会员卡号"); Console.WriteLine("{0}\t{1}\t{2}", name, h, rd.Next(min, max)); Console.WriteLine("继续吗?(yes/no)"); string d = Console.ReadLine(); if (d == "yes") { b = true; } if (d == "no") { Console.WriteLine("系统退出,谢谢使用"); Console.ReadKey(); } }

    相关文章

      网友评论

          本文标题:2018-12-27

          本文链接:https://www.haomeiwen.com/subject/gvnllqtx.html