#代码
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
namespace ConsoleApplication2
{
class Program
{
static void Main(string[] args)
{
bool huida = false;
try
{
do
{
Console.WriteLine("*****欢迎进入奖客富翁系统*****");
Console.WriteLine("1注册");
Console.WriteLine("2登录");
Console.WriteLine("3抽奖");
Console.WriteLine("******************************");
Console.WriteLine("请选择菜单:");
huida = false;
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("输入有误,程序结束");
continue;
}
Console.WriteLine("继续吗(y/n)");
string huida0 = Console.ReadLine();
if (huida0 == "y")
{
huida = true;
}
else
{
Console.WriteLine("您选择退出,程序结束.");
continue;
}
} while (huida == true);
}
catch
{
Console.WriteLine("您输入有误");
}
Console.ReadKey();
}
}
}
#效果