产生20个01000的随机整数,放入一个数组中,然后输出这20个整数的平均值。程序运行后,单击命令按钮(名称为Command1),标题为“输出平均值”,即可求出其平均值,并在窗体上显示出来。Private Sub Command1_Click() Dim arrN(20) As Integer Dim Aver As Single Dim Sum As Integer Randomize For i = 1 To 20 *found* arrN(i) = Int(Rnd * 1001) Next i Sum = 0 For i = 1 To 20 *found* Sum = Sum + arrN(i) Next i *found* Aver = Sum / 20 Print AverEnd Sub