如何编写一个密码程序

来源:百度知道 编辑:UC知道 时间:2024/05/06 20:52:49
要3次密码错误退出的

do
if inputbox("请输入密码:","提示")<>"123" then
i=i+1:msgbox "密码错误,请重新输入!(你还有" & 3-i & "次机会。)"
else
msgbox "密码正确!":wscript.quit
end if
if i=3 then wscript.quit
loop