以下是引用purana在2006-12-18 9:04:21的发言:
Dim I as integer,j as integer
Dim Mat(10,10) as integer
For I = 1 to 10
Mat(I,I) = 1
For j = 1 to I
If j = 1 then
Mat(I,j) = 1
Else
Mat(I,j) = Mat(I-1,j-1) + Mat(I-1,j)
End if
Next
Next
For I = 1 to 10
For j = 1 to I
Print Mat(I,j) & “ “;
Next
Print
Next
原来这个三角形的规律是这样的,刚开始没有找到规律所以无从下手
谢谢,已经运行正常