代码
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace ConsoleApplication1
{
class Program
{
static void Main(string[] args)
{
//输入用户名
Console.WriteLine("请输入用户名");
string yonghuming = Console.ReadLine();
//输入密码
Console.WriteLine("请输入密码");
string mima = Console.ReadLine();
bool b = yonghuming == "admin" && mima == "mypass";
if (b)
{
Console.WriteLine("登录成功");
Console.ReadKey();
}
}
}
}