#代碼
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
namespace ConsoleApplication2
{
? ? class Program
? ? {
? ? ? ? static void Main(string[] args)
? ? ? ? {
? ? ? ? ? ? Console.WriteLine("請(qǐng)輸入用戶名");
? ? ? ? ? ? string name = Console.ReadLine();
? ? ? ? ? ? Console.WriteLine("請(qǐng)輸入密碼");
? ? ? ? ? ? string mima = Console.ReadLine();
? ? ? ? ? ? if (name == "admin" && mima == "88888")
? ? ? ? ? ? {
? ? ? ? ? ? ? ? Console.WriteLine("正確");
? ? ? ? ? ? }
? ? ? ? ? ? else if (name != "admin")
? ? ? ? ? ? {
? ? ? ? ? ? ? ? Console.WriteLine("用戶名不存在");
? ? ? ? ? ? }
? ? ? ? ? ? else if (name == "admin" && mima != "88888")
? ? ? ? ? ? {
? ? ? ? ? ? ? ? Console.WriteLine("密碼錯(cuò)誤");
? ? ? ? ? ? }
? ? ? ? ? ? Console.ReadKey();
? ? ? ? }
? ? }
}
#效果