版权声明:本文为博主原创文章,未经博主允许不得转载。 https://blog.csdn.net/wtxhai/article/details/88553200
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
namespace Example602
{
class Program
{
static void Main(string[] args)
{
Console.Write("请输入登录用户名:");
string name = Console.ReadLine(); //输入用户名
Console.Write("请输入登录密码:");
string pwd = Console.ReadLine(); //输入密码
if (name == "mr" && pwd == "mrsoft")
{
Console.WriteLine("登录成功!");
}
else
{
Console.WriteLine("登录失败,用户名或者密码输入错误!");
}
Console.ReadLine();
}
}
}