Dim a() As Integer
Private Sub Form_Click()
n = Val(InputBox("请输入打印行数"))
ReDim a(n, n)
For i = 1 To n
a(i, 1) = 1: a(i, i) = 1
Next i
For i = 3 To n
For j = 2 To i - 1
a(i, j) = a(i - 1, j - 1) + a(i - 1, j)
Next j
Next i
For i = 1 To n
Print Tab(14 - i);
For j = 1 To i
Print a(i, j);
Next j
Next i
End Sub
[本日志由 admin 于 2013-11-01 10:44 PM 编辑]
引用通告地址 (0):
http://www.cnng.net/blog/trackback.asp?tbID=17
http://www.cnng.net/blog/trackback.asp?tbID=17&CP=GBK
http://www.cnng.net/blog/trackback.asp?tbID=17
http://www.cnng.net/blog/trackback.asp?tbID=17&CP=GBK