有如下VB程序段: Dim a(1 To 10) As Integer
Private Sub Form_Load()
a(1)=2:a(2)=3:a(3)=3:a(4)=3:a(5)=3
a(6)=6:a(7)=7:a(8)=7:a(9)=8:a(10)=9
End Sub
Private Sub Command1_Click()
Dim key As Integer, i As Integer, j As Integer
Dim m As Integer, p As Integer
key=Val(Text1.Text)
i=1: j=10
Do While i <=j
m=(i+j) \ 2
If a(m)=key Then
p=m
j=m-1
Else If key < a(m) Then
j=m-1
Else
i=m+1
End If
Loop
Text2.Text=Str(p)
End Sub
程序运行时,在文本框Text1中输入3,单击按钮,文本框Text2显示的内容是( )