using System;
public class HelloWorld
{
public static void Main()
{
int count = 0;
login:
while(true)
{
string Account_Saved = "jack";
string Password_Saved = "123456";
Console.WriteLine("请输入用户名:");
string username = Console.ReadLine();
Console.WriteLine("请输入密码:");
string password = Console.ReadLine();
if (username == Account_Saved && password == Password_Saved)
{
Console.WriteLine("登录成功!");
break;
}else
{
count +=1;
if (count>3)
{
Console.WriteLine("连续三次输入错误!请返回重新输入!");
goto login;
}
}
}
Console.WriteLine("HELLO JSRUN - from C# ");
}
}