<VB数理统计实用算法>书中的算法源程序

源代码在线查看: 文本框_平均值m.bas

软件大小: 11653 K
上传用户: zhou28
关键词: 算法 lt VB gt
下载地址: 免注册下载 普通下载 VIP

相关代码

				Attribute VB_Name = "modCalculate"
				'文本框数组录入数据
				'计算平均值
				Option Explicit
				Public intRow As Integer            '行数
				Public intCol As Integer            '列数
				Public dblArray() As Double         '录入数据
				
				'计算平均值函数
				Function XYZ(intR As Integer, intC As Integer, ABC() As Double) As Double
				    Dim dblSum As Double
				    Dim intI As Integer, intJ As Integer
				    dblSum = 0#
				    For intI = 1 To intR
				        For intJ = 1 To intC
				            dblSum = dblSum + ABC(intI, intJ)                   '求和
				        Next intJ
				    Next intI
				    XYZ = dblSum / (intR * intC)                                '求平均值
				End Function
				
							

相关资源