题型:单选题 题类:常考题 难易度:普通
浙江省2020届高三上学期信息技术五校联考试卷
Key = Int(Rnd * 49) * 2 + 1
s = 0: i = 1: j = 10
Do While i <= j
m = (i + j) \ 2
If Key = a(m) Then Exit Do If Key < a(m) Then
j = m - 1: s = 2 * s
Else
i = m + 1: s = 2 * s + 1
End If Loop
数组a(1)到a(10)的值依次为“2,6,7,15,20,24,27,43,52,63”,执行该程序段后,s的值不可能为( )
i= 1 : j =9 : n =0
key=Val( Textl.Text)
Do While i <= j
m=(i + j) \ 2
If key = d(m) Then
Exit Do
j= m - 1
Else
i=m+1
End If
Loop
方框中的正确代码应为( )
试题篮