using System;
using System.Collections.Generic;
using System.Text;
namespace while判斷用戶名密碼
{
class Program
{
static void Main(string[] args)
{
bool count = true;
while (count)
{
Console.WriteLine("請輸入帳號");
string username = Console.ReadLine();
Console.WriteLine("請輸入密碼");
string password = Console.ReadLine();
if (username == "admin" && password == "888")
{
count = false;
}
else
{
count = true;
}
}
Console.WriteLine("歡迎使用本系統");
Console.ReadKey();
}
}
}