试题 试卷
题型:单选题 题类:常考题 难易度:普通
内蒙古巴彦淖尔市临河三中计算机班2018-2019学年高二上学期信息技术期中考试试卷VB
Private Sub Command1_Click()
Dim a(1 To 5) As Integer
a(5)=Val(Text1.text)
For i=4 To 1 Step -1
a(i)=a(i+1)\2
Next i
Label1.caption=str(a(1))
End sub
在文本框Text1中输入“100”,单击命令按钮Command1后,标签Label1中显示的内容是( )
L = 0: R = 7: i = 1
Do While i < R
If a(i) = 0 Then
L = L + 1
t = a(i): a(i) = a(L): a(L) = t i = i + 1
ElseIf a(i) = 2 Then
R = R - 1
t = a(i): a(i) = a(R): a(R) = t
Else
i = i + 1
End If
Loop
数组元素 a(1)到 a(6)的值依次为“2,0,2,1,1,0”。执行该程序段后,下列说法不正确的是( )
①s[:4] ②s[-5:-1] ③s[:2]+s[3]*2 ④s[0:2]+s[3:5]
试题篮