Key = Val(Text1.Text): i = 1: j = 10
Do While i <= j
m = (i + j + 1) \ 2
t(m) = 2
If Key <= a(m) Then
j = m - 1
Else
i = m + 1
End If
Loop
For i = 1 To 10
s = s + t(i)
Next i
數(shù)組元素t(1)至t(10)初值均為0,數(shù)組元素a(1)至a(10)的值依次為“4,7,9,11,16,19,22,24,28,29”,在文本框Text1中輸入待查找數(shù),執(zhí)行該程序段后,下列選項中,s的值可能的是( )
微信掃碼預(yù)覽、分享更方便