版权声明 关于本站 在线留言 登陆管理 个人博客 |
『辰桦网络』. All Rights Reserved Station construction time: on April 4, 2006 |
例n=5,输出形式如下:
1
1 1
1 2 1
1 3 3 1
1 4 6 4 1
1.首先建立一个名为sj的表单
建立modi comm sj
2.在表单中输入以下语句:
set talk off
clear
input "n=" to n
dime a(n,n)
p=n
do while n>0
a(n,n)=1
a(n,1)=1
n=n-1
enddo
for i=3 to p
for j=2 to i-1
a(i,j)=a(i-1,j-1)+a(i-1,j)
endfor
endfor
for i=1 to p
?space(3*(p-i+1))
for j=1 to i
??str(a(i,j),3)
endfor
?
endfor
set talk on
3.运行do sj