#代码
bool j=false;
try
{
do
{
Console.WriteLine("*****欢迎进入奖客富翁系统*****");
Console.WriteLine(@"
1.注册
2.登录
3.抽奖");
Console.WriteLine("****************************************");
string str_num = Console.ReadLine();
int num = Convert.ToInt32(str_num);
switch (num)
{
case 1:
Console.WriteLine("[奖客富翁系统>注册]");
Console.WriteLine("请填写个人注册信息:");
Console.WriteLine("用户名:");
string aob = Console.ReadLine();
Console.WriteLine("密码:");
string cob = Console.ReadLine();
System.Random Random= new System.Random();
int result = Random.Next(1000, 9999);
Console.WriteLine("注册成功,请记好您的会员卡号");
Console.WriteLine("用户名\t密码\t会员卡号");
Console.WriteLine("{0}\t{1}\t{2}", aob, cob, result);
break;
case 2:
Console.WriteLine("[奖客富翁系统>登录]");
break;
case 3:
Console.WriteLine("[奖客富翁系统>抽奖]");
break;
default:
Console.WriteLine("你输入有误!");
break;
}
Console.WriteLine("继续吗?(y/n):");
string z = Console.ReadLine();
if (z == "y")
{
j = true;
}
else
{
j = false;
Console.WriteLine("系统退出,谢谢使用");
}
}while(j==true);
}
catch
{
Console.WriteLine("你输入有误!");
}
#效果
网友评论