VERSION 5.00
Begin VB.Form Form1 
   Caption         =   "数组"
   ClientHeight    =   3195
   ClientLeft      =   60
   ClientTop       =   345
   ClientWidth     =   5640
   LinkTopic       =   "Form1"
   ScaleHeight     =   3195
   ScaleWidth      =   5640
   StartUpPosition =   3  '窗口缺省
   Begin VB.CommandButton Command1 
      Caption         =   "Command1"
      Height          =   495
      Left            =   1680
      TabIndex        =   0
      Top             =   2400
      Width           =   1575
   End
End
Attribute VB_Name = "Form1"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False
Private Sub Command1_Click()        '        单击命令按钮运行该事件函数
  Dim mark(1 To 100) As Integer, aver!, n%, i%
  aver = 0
  For i = 1 To 100
    mark(i) = Int(Rnd * 101)
    aver = aver + mark(i)
  Next i
  aver = aver / 100
  n = 0
  For i = 1 To 100
    If mark(i) > aver Then n = n + 1
  Next i
  Print aver, n
End Sub

