[填空题] 在窗体上画一个名为Command1的命令按钮。下列程序的功能是:从输入对话框输入一个正整数n。用随机函数产生n个1~100范围的随机数,然后求出去掉一个最大数和最小数的平均数。根据题意,请完善下列程序:
Private Sub Command1_Click()
Dim ave As Single, max As Integer, i As Integer, n As Integer
Dim min As Integer, Sum As Integer, s As String
Dim t As Integer
s=InputBox("输入一个正整数: ")
n=Val(s)
If n>0 Then
max=n: min=n: Sum=0
For j=1 To n
t=【11】
print t;
Sum=Sum+t
If t<min Then
min=t
ElseIf max<t Then
max=t
End If
Next j
【12】
ave=Sum/n
MsgBox"平均值="+Str(ave),,"去掉最大数和最小数后"
End If
End Sub