Private Sub Command1_Click()
Dim d(1 To 10) As Integer, i As Integer, j As Integer
Dim m As Integer, key As Integer, s As String
key = Int(Rnd( ) * 50) *2+ 1
s = "": i = 1: j = 10
Do While i <= j
m = (i + j) \ 2
If key = d(m) Then Exit Do
If key < d(m) Then
j = m - 1: s = s + "L"
Else
i = m + 1: s = s + "R"
End If
Loop
Label1.Caption = s
End Sub
若數(shù)組d(1)至d(10)的值依次為"11,13,20,48,51,67,70,73,80,91",若執(zhí)行后 Label1 上顯示2個(gè)“L”和1個(gè)“R”或2個(gè)“R”和1個(gè)“L”,則key的可取值個(gè)數(shù)為( )