关于杨辉三角
我想问下ASP能写出杨辉三角么?如果能怎样写给点思路!我想了好久都没头绪!
<% dim a(10,10) dim i dim j for i=0 to 9 j=10 Do While j>=i response.write " " ' 两个空格 j=j-1 Loop j=0 Do While j<=i if i=j or j=0 then a(i,j)=1 Else a(i,j)=a(i-1,j)+a(i-1,j-1) End IF Response.Write a(i,j)&" " if i=j then Response.Write "<br>" End IF j=j+1 Loop next %>