设有如下程序 Private Sub Search(a()As Variant,By Val key As Variant,index%)   Dim I%   For I=LBound(a) To UBound(a)   If k

admin2012-03-22  20

问题 设有如下程序
   Private Sub Search(a()As Variant,By Val key As Variant,index%)
     Dim I%
     For I=LBound(a) To UBound(a)
     If key=a(I) Then
     Index=I
     Exit Sub
     End If
     Next I
     Index=-1
   End Sub
   Private Sub Form_Load()
   Show
   Dim b() As Variant
   Dim n As Integer
   b=Array(1,3,5,7,9,11,13,15)
   Call Search(b,11,n)
   print n
   End Sub
   程序运行后,输出结果是______。

选项

答案5

解析
转载请注明原文地址:https://kaotiyun.com/show/OFhp777K
0

最新回复(0)