(1)VB 用随机函数产生20个两位数的整数,存于4行5列的二维数组中,并求出其中的最大元素及它的行、列坐标,将数组按行

1个回答

  • 第一题:

    Option base 1

    Private Sub Form_Click()

    Dim a(4,5) as integer ,i as integer ,j as integer ,s as integer

    dim a_ave as single

    randomize

    for i=1 to 4

    for j =1 to 5

    a(i,j)=int(91*rnd+10)

    print Format(a(i,j),"@@@@@@");

    next j

    print

    next i

    s=a(1,1)

    For i=1 to 4

    For j =1 to 5

    if a (i,j)