用VB求最大值最小值和平均值
问题描述:
用VB求最大值最小值和平均值
答
dim arr,idim n_min,n_max,n_sum,n_avarr="1,2,3,4,5,6,7,8,9,10,11,12"arr=split(arr,",")n_min=clng(arr(0))n_max=clng(arr(0))n_sum=clng(arr(0))for i=1 to ubound(arr)if n_min>clng(arr(i)) then n_min=clng(a...