试题 试卷
题型:单选题 题类:模拟题 难易度:普通
浙江省杭州市2015年高考模拟命题比赛信息技术(1)
Private Sub Command1_Click()
Dim a(1 To 4) As Integer
Dim i As Integer
a(1) = 1
For i = 2 To 4
a(i) = 2 * a(i - 1) + 1
Next i
List1.AddItem Str(a(i))
End Sub
Private Sub Commandl_Click( )
Dim s, p As String
Dim a, n As Integer
Dim kms As Integer
s= ①
n = Len ( s ):a = 0 :kms = Val(Text2.Text)
If n Mod kms = 0 Then
For i= ②_______
p = Mid(s,i,1)
If p= "A" or p= "a" Then a = a+l
Text3.Text = Str(a)
Else
Text3.Text="学生等级信息不正确"
End If
请回答下列问题:
Private Sub Command1_C1ick ( )
Dim a(0 to 5) As Integer
a(5)=Val(Text1.text)
For I=4 to 1 step -1
a(I)=a(I+1)/2
Next I
Text2.text=str(a(I))
End sub
在文本框Text1中输入“96”,单击命令按钮Command1后,文本框Text2中显示的内容是( )
图1
a=5
b=3
If a>b Then
a=b
End lf
s = "2019appreciate": sum = 0
For i = 1 To Len(s)
ch = Mid(s, i, 1)
If ch >= "a" And ch <= "z"
Then m = Asc(ch) - Asc("a") + 1 a(m) = a(m) + 1
End If Next i
For i = 1 To 10
If a(i) > 0
Then sum = sum + 1
数组 a 各元素的初始值都为 0,执行该程序段后,则变量 sum 的值为( )
试题篮