Private Sub Command1_Click()
Dim a() As Single,s As Single
Dim n%
n = InputBox("输入个数")
ReDim a(n)
For i = 1 To n
a(i) = InputBox("输入数值")
Next i
For i = 1 To n
s = s + a(i)
Next i
Print "和="; s
Print "平均值="; s / n
s = 0
For i = 1 To n
s = s + a(i) ^ 2
Next i
Print "平方和="; s
Print "平方和的平方根="; Sqr(s)
End Su