2018-11-23魔法游戏厅作业五
2018-11-23 本文已影响0人
大长腿快快跑
Console.WriteLine("请输入用户数量");
int people = Convert.ToInt32(Console .ReadLine ());
int n = 1;
for(n=1;n<=people;n++)
{
Console.WriteLine ("请输入第{0}位用户信息:",n);
Console.Write("请输入用户编码《四位数整》:");
int a = Convert.ToInt32(Console.ReadLine());
Console.Write("请输入用户年龄:");
int b = Convert.ToInt32(Console.ReadLine());
if (b<=10)
{
Console.WriteLine("你的年龄不适合玩该游戏");
continue;
}
Console.Write("请输入用户积分:");
int c= Convert.ToInt32(Console.ReadLine());
Console.WriteLine("您录入的信息是:");
Console.WriteLine("用户编号:{0}"+" "+"年龄:{1}"+" "+"积分:{2}",a,b,c);
}
Console.ReadKey();