主函数实现数据输入及平均值输出?
Function Average(mySinge() As Single) As Single
Dim sn As Single
Dim cn As Integer, i As Integer
cn = UBound(mySinge) - LBound(mySinge) + 1
For i = LBound(mySinge) To UBound(mySinge)
sn = sn + mySinge(i)
Next i
Average = sn / cn
End Function
Copyright © 广州京杭网络科技有限公司 2005-2025 版权所有 粤ICP备16019765号
广州京杭网络科技有限公司 版权所有