试题 试卷
题型:单选题 题类:常考题 难易度:普通
海南省文昌中学2018-2019学年高一下学期信息技术段考信息试卷
a = a * b
b = a / b
a = a / b
K=Val(Text1.Text)
left1=1:right1=10
Do While(left1<=right1)
mid1=(left1+right1)\2
If a(mid1)<=k Then left1=mid1+1 Else right1=mid1-1
Loop
Text2.Text=Str(right1)
已知数组a(1)到a(10)的原始数据为1,4,5,5,5,5,8,9,9,10。程序运行时,在文本框Text1中输入5,文本框Text2显示的内容是( )
实现上述功能的VB程序如下:
Dim a(1 To 5) As Integer
For i = 1 To 5
a(i) = Int(Rnd * 30 + 10)
t = t + a(i) \ 10
Next i
For j = 1 To t \ 3
If j Mod 2 = 1 Then a(j) = a(j) + 1 Else a(j) = a(j) - 1
Next j
运行程序后,数组a各个元素的值,不可能的是( )
试题篮