Private Sub Command1_Click()
Dim a(1 To 10) As Double
Dim ave As Double, max As Double, min As Double, sum As Double
For i = 1 To 10
a(i) = Val(InputBox("请输入第" & i & "个数"))
sum = sum + a(i)
Print a(i);
Next i
max = a(1): min = a(1)
For i = 2 To 10
If max < a(i) Then max = a(i)
If min > a(i) Then min = a(i)
Next i
ave = sum / 10
Print "最大值为:"; max
Print "最小值为:"; min
Print "平均值为:"; ave
End Sub
Option Explicit
Private Sub Form_Load()
Me.AutoRedraw = True
Dim v(1 To 10) As Double
Dim i As Integer, av As Double, max As Double, min As Double
For i = 1 To 10
v(i) = InputBox("输入第" & i & "个数据:")
Next i
max = v(1): min = v(1): av = 0
For i = 1 To 10
av = av + v(i)
If max < v(i) Then max = v(i)
If min > v(i) Then min = v(i)
Print v(i)
Next i
av = av / 10
Print "平均值:" & av
Print "最大值:" & max
Print "最小值:" & min
End Sub
Private Sub Command1_Click()
dim a(1 to 10) as integer
dim min,max,temp,p as integer
for i=1 to 10
a(i)=val(inputbox("输入值"))
p=p+a(i)
if a(i)>max then max=a(i)
if a(i)next i
print "平均值";p/10print "最大值";maxprint "最小值";min
End Sub