求实现扬辉三角的VB源程序!
Option Explicit
Dim a(21, 21) As Long
Dim b(21) As String
Dim i As Byte
Dim j As Byte
Private Sub Form_Load()
a(0, 0) = 1
For i = 1 To 20
For j = 1 To 20
a(i, j) = a(i - 1, j - 1) + a(i - 1, j)
If a(i, j) <> 0 Then
b(j) = b(j - 1) & " " & a(i, j)
End If
Next
Print b(i)
Next
End Sub