题目
实现菜单输出显示
代码
try
{
Console.WriteLine("****欢迎进入奖客富翁系统****");
Console.WriteLine(" 1.注册 ");
Console.WriteLine(" 2.登录 ");
Console.WriteLine(" 3.抽奖 ");
Console.WriteLine("****************************");
Console.WriteLine ("请选择菜单:");
int num= Convert.ToInt32 (Console.ReadLine ());
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.ReadKey();