Next i
For i = 1 To n
For j = 1 To i
Print Tab(20 - 2 * i + 4 * j); arr(i, j);
Next j
Print
Next i
End Sub
建议看看类似的源码
http://hi.baidu.com/%CD%C7%B7%CF%C9%B5%D3%E3/blog/item/b13ef01a5ddb86d3ad6e7533.html
Private Sub Form_Click()
Const n = 10
Dim arr(n, n) As Integer
For i = 1 To n
arr(i, i) = 1
arr(i, 1) = 1
Next i
For i = 3 To n
For j = 2 To i - 1
arr(i, j) = arr(i - 1, j) + arr(i - 1, j - 1)
Next j
Next i
For i = 1 To n
For j = 1 To i
Print Tab(20 - 2 * i + 4 * j); arr(i, j);
Next j
Print
Next i
End Sub