using System;
namespace C5_1
{
public class Program
{
public static void Main()
{
string userName, passworld;
int i;
for (i = 0; i < 3; i++)
{
Console.WriteLine("請輸入使用者名:");
userName = Console.ReadLine();
Console.WriteLine("請輸入密碼:");
passworld = Console.ReadLine();
if (userName.Trim().ToLower() == "admin" && passworld == "admin888")
{
Console.WriteLine("你好,歡迎進入本系統!\n");
return;
}
else
{
Console.WriteLine("對不起,你輸入的資訊輸入錯誤,請重新輸入\n");
}
}
}
}
}
沒有留言:
張貼留言