某查找算法的VB程序段如下:
k= Val(Text1.Text)
i=1:j=6:Label1.Caption="":f=False
Do While i<=j And Not f
m=(i+j)\2
If a(m)=k Then f= True
If a(m)>a(i) Then
If a(i)<=k And k<a(m)Then j=m-1 Else i=i+1
Else
If a(m)<k And k<=a(j)Then i=i+1 Else j=j-1
End If
Label1 Caption=Label1 Caption+ Str(a(m))
Loop
数组元素a(1)到a(6)的值依次为“58,66,72,24,35,40”,在文本框Text1中输人的值为35,执行该程序段,标签 Label1中显示的值是( )
A.72 35 | B.24 35 |
C.72 24 35 | D.72 24 24 35 |