第1个回答 2017-05-15
试下这个,只需改动 b(i)=a(i\10+1,i mod 10)换成b(i) = a((i - 1) \ 10 + 1, (i - 1) Mod 10 + 1)
如下:
Private Sub form_click()
Dim a(1 To 10, 1 To 10) As String, b(1 To 100) As String
For i = 1 To 10
For j = 1 To 10
a(i, j) = i * j
Next j
Next i
For i = 1 To 100
b(i) = a((i - 1) \ 10 + 1, (i - 1) Mod 10 + 1)
Print b(i);
Next i
End Sub
第2个回答 2017-05-15
若每一行有N列,a数组的第一行为a(1,1)~a(1,N)
则以下的循环可以实现这一功能:
For i=1 to N
b(i)=a(1,i)
Next i本回答被网友采纳