#作业目标:
##编码:
for (int i = 1; i >= 1; i++)
{
Console.WriteLine("*****欢迎进入奖客富翁系统*****");
Console.WriteLine(@" 1.注册
2.登录
3抽奖");
Console.WriteLine("*****************************");
Console.Write("请选择:");
//选择菜单编号
string str_num = Console.ReadLine();
try
{
int num = Convert.ToInt32(str_num);
switch (num)
{
case 1:
Console.WriteLine("富豪系统>注册");
break;
case 2:
Console.WriteLine("富豪系统>登录");
break;
case 3:
Console.WriteLine("富豪系统>抽奖");
break;
default:
Console.WriteLine("您输入有误!");
break;
}
}
catch { Console.WriteLine("您输入有误!"); }
//询问是否继续
Console.Write("继续吗? (Y/N):");
string a = Console.ReadLine();
//判断
if (a != "Y")
{ Console.WriteLine("系统退出!谢谢使用!");
break;
}
}
Console.ReadKey();