dim lngDat(1 to n,1 to m) as Long dim dblBuf as Double dim i,j as integerfor i=1 to n for j=1 to m dblbuf=dblbuf+lngdat(i,j) next j next idebug.print "平均值:" & dblbuf/(n*m)for i=1 to n for j=1 to m if lngdat(i,j)>dblbuf/(n*m) then debug.print "行:" & i & " 列:" & j & "," & intdat(i,j) & " 大于平均值" end if next j next i
dim lngDat(1 to n,1 to m) as Long dim dblBuf as Double dim i,j as integerfor i=1 to n for j=1 to m dblbuf=dblbuf+lngdat(i,j) next j next idebug.print "平均值:" & dblbuf/(n*m)for i=1 to n for j=1 to m if lngdat(i,j)>dblbuf/(n*m) then debug.print "行:" & i & " 列:" & j & "," & intdat(i,j) & " 大于平均值" end if next j next i 这段代码就很清楚啦
dim dblBuf as Double
dim i,j as integerfor i=1 to n
for j=1 to m
dblbuf=dblbuf+lngdat(i,j)
next j
next idebug.print "平均值:" & dblbuf/(n*m)for i=1 to n
for j=1 to m
if lngdat(i,j)>dblbuf/(n*m) then
debug.print "行:" & i & " 列:" & j & "," & intdat(i,j) & " 大于平均值"
end if
next j
next i
dim dblBuf as Double
dim i,j as integerfor i=1 to n
for j=1 to m
dblbuf=dblbuf+lngdat(i,j)
next j
next idebug.print "平均值:" & dblbuf/(n*m)for i=1 to n
for j=1 to m
if lngdat(i,j)>dblbuf/(n*m) then
debug.print "行:" & i & " 列:" & j & "," & intdat(i,j) & " 大于平均值"
end if
next j
next i
这段代码就很清楚啦