两个简单的vb题,求大神详解...

如题所述

第1个回答  2015-06-25
第一题:
dim i As Integer,j As Integer, aa(35,3) As Integer, nn(3) As Integer,N as integer
N=3
for i=0 to 3:nn(i)=0:next
for i=1 to 100
j=i mod N: nn(j)=nn(j)+1:aa(nn(j),j)=i
next
for j=0 to N-1
print "余数为";j;"的数有:";
for i=1 to nn(j)
print aa(i,j);
next
print
next
第二题:
dim i As Integer,mx As Single, mi As Single,aa(8) As Single, N as integer
dim ss as Single, a As Single
N=8:mi=1000:mx=0:ss=0
for i=1 to 8:a=aa(i)
if a>mx then mx=a
if a<mi then mi=a
ss=ss+a
next
ss=ss/N
print "最高分:";mx;" 最低分:";mi; " 平均分:";ss追问

仰望大神...T^T

追答

请采纳

本回答被提问者和网友采纳
相似回答