盾怪网教程:是一个免费提供流行杀毒软件教程、在线学习分享的学习平台!

局限输入次数的系统登陆的完成

时间:2025/1/5作者:未知来源:盾怪网教程人气:

[摘要]今天在外面看书 看到一个写登陆的程序 可是没有限制登陆的次数想了一下 做了这个程序 简单的来表示一下如何限制 登陆次数using System;namespace Ginger547class Cl...
今天在外面看书 看到一个写登陆的程序 可是没有限制登陆的次数

想了一下 做了这个程序 简单的来表示一下如何限制 登陆次数

using System;

namespace Ginger547

{

class Class1

{

public static void Main(string[] args)

{

int i = 3;

string strInput = null ;

for (i = 1 ; i<= 3 ; i++)

{

Console.WriteLine ("输入密码");

strInput = Console.ReadLine();

if (strInput =="Ginger547")

break;

else

Console.WriteLine("密码错误,无法进入");

Console.WriteLine();

}

if (strInput == "Ginger547")

Console.WriteLine("Login 成功");

else

Console.WriteLine("非法进入.......");

Console.ReadLine();



}

}

}





关键词:局限输入次数的系统登陆的完成




Copyright © 2012-2018 盾怪网教程(http://www.dunguai.com) .All Rights Reserved 网站地图 友情链接

免责声明:本站资源均来自互联网收集 如有侵犯到您利益的地方请及时联系管理删除,敬请见谅!

QQ:1006262270   邮箱:kfyvi376850063@126.com   手机版