try
{
Console.WriteLine("請輸入用戶數(shù)量:");
int number = Convert.ToInt32(Console.ReadLine());
? ? ? ? ? ? for (int i = 1; i < number + 1; i++)
? ? ? ? ? ? {
? ? ? ? ? ? ? ? int id = 0;
? ? ? ? ? ? ? ? int year = 0;
? ? ? ? ? ? ? ? int jifen = 0;
? ? ? ? ? ? ? ? Console.WriteLine("請輸入第{0}位用戶信息", i);
? ? ? ? ? ? ? ? Console.WriteLine("請輸入用戶編號(hào)(四位數(shù)):");
? ? ? ? ? ? ? ? id = Convert.ToInt32(Console.ReadLine());
? ? ? ? ? ? ? ? Console.WriteLine("請輸入用戶年齡");
? ? ? ? ? ? ? ? year = Convert.ToInt32(Console.ReadLine());
? ? ? ? ? ? ? ? if (year < 10)
? ? ? ? ? ? ? ? {
? ? ? ? ? ? ? ? ? ? Console.WriteLine("很抱歉你的年齡不適合玩此游戲方淤,此用戶信息錄入失敗");
? ? ? ? ? ? ? ? }
? ? ? ? ? ? ? ? else
? ? ? ? ? ? ? ? {
? ? ? ? ? ? ? ? ? ? Console.WriteLine("請輸入用戶積分");
? ? ? ? ? ? ? ? ? ? jifen = Convert.ToInt32(Console.ReadLine());
? ? ? ? ? ? ? ? ? ? Console.WriteLine("你錄入的信息為:");
? ? ? ? ? ? ? ? ? ? Console.WriteLine("用戶編號(hào):{0},? 年齡:{1}? 積分:{2}", id, year, jifen);
? ? ? ? ? ? ? ? }
? ? ? ? ? ? }
? ? ?