试题 试卷
题型:填空题 题类:常考题 难易度:普通
浙江省杭州市长征中学2018-2019高一下学期信息技术期末考试试卷
为实现上述功能,请将以下程序补充完整。
Private Sub Command1_Click()
Dim j As Integer, k As Integer
List1.Clear
For k = 1 To 100
j = Int(Sqr(k))
If Then List1.AddItem
Next k
End Sub
Dim s(1 To 81) As Integer, i As Integer, j As Integer, c As Integer, temp As Integer
c=0 : s(1) = 0
For i = 1 To 9
For j = 1 To i
temp = s(j * i)
s(j * i) = j * i
If temp <> s(j * i) And s(j * i) Mod 9 = 0 Then c = c + 1
Next j
Next i
该程序段运行后,变量C的值为( )
i = 1: j = 8: s = ""
key =Text1.Text
Do While i <= j
m =(i + j) \ 2
If key = a(m) Then
s = s + "M"
Exit Do
ElseIf key > a(m) Then
j = m - 1: s = s + "L"
Else
i = m + 1: s = s + "R"
End If
Loop
Text1.Text = s
数组元素a(1)到a(8)的值依次为“4,22,27,32,35,44,56,59”,该程序段执行后,文本框Text1中显示的内容不可能是( )
For i=1To n\2
k=i
If a(j) <a(k) Then k=j
If i<>k Then
t=a(i):a(i)=a(k):a(k)=t
If Then
t=a(j):a(j)=a(j+1):a(j+1)=t
上述程序中方框处可选语句或表达式有:
①For j=i+1 To n-i+ 1 ②For j=i+1 To n-i
③a(j)<a(j+1) ④a(j)>a(j+1)
则(1)、(2)、(3)处语句依次是( )
试题篮