『壹』 谁知道VB输出杨辉三角形的代码怎么写/
先把form的autoredraw属性改竖胡成true,代码如下坦纤戚:
==========================
Option Explicit
Dim a(10, 10) As Long
Dim b(10) As String
Dim i As Byte
Dim j As Byte
Private Sub Form_Load()
a(0, 0) = 1
For i = 1 To 9
For j = 1 To 9
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