编辑代码

using System;

public class HelloWorld
{
    public static void Main()
    {
       //JSRUN引擎2.0,支持多达30种语言在线运行,全仿真在线交互输入输出。
       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# ");
    }
}