vb语句 设计一个随机数程序,生成10个范围是1到100随机整数,并求出这10个数的最大值,最小值和平均数

问题描述:

vb语句 设计一个随机数程序,生成10个范围是1到100随机整数,并求出这10个数的最大值,最小值和平均数

'声明变量dim Min_num as intdim Max_num as intdim Sum_num as intdim Arr_num(9) as int'赋予初始值Min_num=101Max_num=-1Sum_num=0'循环10次获得10个随机数for i=1 to 10randomizeArr_num(i-1)=int(r...