vb程序设计教程答案

Option Explicit

Private Sub Command1_Click()

Dim a() As Integer

Dim i, j, n

ReDim a(9, 9)

For i = 1 To 8

Print Tab(25 - i * 2);

For j = 1 To i

a(i, 1) = 1

a(i, i) = 1

a(i + 1, j + 1) = a(i, j) + a(i, j + 1)

Print a(i, j);

Next j

Print

Next i

End Sub