单选题
在窗体上画一个文本框,然后编写如下代码:
Option Base 1
Private Sub Form_Click()
Dim arr
Dim Start As Integer,Finish As Integer
Dim Sum As Integer
arr=Array(12,4,8,16)
Start=LBound(arr)
Finish=UBound(arr)
Sum=0
For i=Start To Finish
Sum=Sum+arr(i)
Next i
c=Sum/Finish
Text1.Text=c
End Sub
程序运行后,单击窗体,则在文本框中显示的内容是