using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
namespace TrainText
{
class Program
{
static void Main(string[] args)
{
while (true)
{
IsPwd();
}
}
public static void IsPwd()
{
Console.WriteLine("請輸入用戶名:");
string userName = Console.ReadLine();
Console.WriteLine("請輸入密碼:");
string userPwd = Console.ReadLine();
if (userName == "admin" && userPwd == "888888")
{
Console.WriteLine("正確!");
}
else if (userName != "admin")
{
Console.WriteLine("用戶名不正確");
}
else if (userName == "admin" && userPwd != "888888")
{
Console.WriteLine("密碼輸入錯誤!");
}
else
{
Console.WriteLine("未知錯誤!");
}
}
}
}