试题 试卷
题型:判断题 题类:模拟题 难易度:容易
新疆昌吉回族自治州第一中学2020-2021学年高三学业水平信息技术模拟测试卷
图1
Private Sub Command1_Click()
Dim a As Integer
Dim b As Boolean
a = (a + 1) * 2
b = a - 1
print a:print b
End Sub
程序运行时,单击命令按钮Command1后,变量a和b的值分别是( )
i = 1: j = 7: s = ""
key = 34
Do While i <= j
m = (i + j) \ 2
If key = a(m) Then
s = s + "2": Exit Do 'Exit Do 表示退出循环
ElseIf key < a(m) Then
j = m - 1: s = s + "1"
Else
i = m + 1: s = s + "3"
End If
Loop
Text1.Text = s
数组元素a(1)到a(9)的值依次为“15,26,34,47,53,59,60,72,85”。若该程序段执行后,文本框Text1中显示的内容可能是( )
Dim i As Integer
Dim a(10)As Integer ‘①
For i=1 To 10 ‘②
a(i)=Rnd* 100 ‘③
Next i
Label1.Caption=Str(a(i)) ‘④
Dim d(1 To 8) As Integer
Dim i As Integer, s As Integer
d(1)=1
For i=2 To 10
d(i)=d(i-1)*i
For i=1 To 5
s=s+d(i)
Text1.Text = Str(s)
程序运行时,单击命令按钮Command1后,将会出现的提示信息是( )
试题篮