int a = 0;
string b = "y";
while (b == "y")
{
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("奖客富翁系统>注册");
break;
case 2:
Console.WriteLine("奖客富翁系统>登陆");
break;
case 3:
Console.WriteLine("奖客富翁系统>抽奖");
break;
}
Console.WriteLine("继续使用该系统吗? y/n");
b = Console.ReadLine();
switch (b)
{
case "y":
Console.WriteLine("");
break;
case "n":
Console.WriteLine("退出系统,谢谢使用。");
break;
}
}
Console.ReadKey();
网友评论