代码: Private Sub Command1_Click()
Me.CurrentX = 100
Dim a(1 To 8, 1 To 8) As Integer
Dim i As Integer, j As Integer
a(1, 1) = 1
For i = 2 To 8
For j = 1 To i
If j = 1 Or j = i Then
a(i, j) = 1
Else
a(i, j) = a(i - 1, j - 1) + a(i - 1, j)
End If
Next j
Next i
For i = 1 To 8
Print
Me.CurrentX = 1000 - 120 * i
For j = 1 To i
Print Space(2) & a(i, j);
Next j
Next i
End Sub
图: