题型:单选题 题类:常考题 难易度:困难
浙江省宁波市镇海中学2021届高三上学期信息技术选考适应性测试卷
Key = Val (Text1. Text)
low = 0: high = 9: flag = False
Do While low <= high And Not flag
m=(low +high)\ 2
If Key > a(m) Then
low = m +1
ElseIf Key < a(m)Then
high = m- 1
Else
If ① Then
If ② Then high = m- 1 Else flag = True
Else
flag = True
End If
End If
Loop
If flag = True Then
Print("元素的下标是:"+ Str(m))
Else
Print("元素未找到.")
End If
若数组元素a(0)~a(9)的值依次为“2,2,6,8,10,10,13,15,17,26”,在文本框Text1中输入10,运行上述程序后,程序输出“元素的下标是:4”。程序中① ②处代码为( )
试题篮