题型:综合题 题类:常考题 难易度:普通
浙江省宁波市十校2019届高三上学期9月联考试卷
Private Sub Command1_Click
Dim s As String, ch As String, sum As Integer
Dim fh As Integer
s = Text1.Text: fh = 1: p = 0: sum=0
For i = 1 To Len(s)
ch = Mid(s, i, 1)
If ch >= "0" And ch <= "9" Then
p =
Else
sum =
p = 0
If ch = "-" Then
fh = -1
ElseIf ch = "+" Then
fh = 1
End If
End If
Next i
Label1.Caption = Str(sum)
End Sub
①共八位字符,前两位为字母“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
S=0 :T=1 For i=1 to 100 S=s+i*T T=-T Next i
| S=0 For i=1 to 100 S=s+i*(-1)^(i+1) Next i
| S=0 For i=1 to 100 S=s+i*(-1)^i Next i
| S=0:S1=0:S2=0 For i=1 to 50 S1=s1+2*i-1 S2=s2+2*i Next i S=s1-s2 ④ |
试题篮