①共八位字符,前两位为字母“zj”,后六位是数字,并以66开头(即密码格式为zj66****);
②最后两位数字相同;
③后六位数能被16和46同时整除。
单击“找回密码”按钮(Command1)后,可能的密码显示在列表框List1中。
|
Private Sub Command1Click()
Dim s As Long , a As Integer, b As Integer, c As Integer, i As Integer
For i = 0 To 9999
s = 660000 + i
If ① And s Mod 46 = 0 Then
'(选填字母,从下列A、B 、C、D四个选项中选取一项)
a = s Mod 10
b = (s Mod 100) \ 10
If ② Then '(选填字母,从下列A、B 、C、D四个选项中选取一项)
List1.AddItem ("zj" + Str(s))
c = ③ '(填程序代码)
End If
End If
Next i
Label1.Caption = "共有" + Str(c) + "个"
End Sub