作者在 2015-04-21 13:45:17 发布以下内容
CLEAR
FOR I=1 TO 26
STORE "" TO A,B
?I,SPACE(26-I)
FOR J=1 TO I
A=A+CHR(J+64)
IF J=1
B=""
ELSE
B=CHR(J+63)+B
ENDIF
ENDFOR
?? A+B
ENDFOR
数字金字塔代码
clear
for i=1 to 9
store "" to a,b
?space(9-i)
for j=1 to i
a=a+str(j,1)
if j=1
b=""
else
b=str(j-1,1)+b
endif
endfor
??a+b
endfor
效果图
1
121
12321
1234321
123454321
12345654321
1234567654321
123456787654321
12345678987654321
clear
for i=1 to 9
?space(10-i)
for j=1 to i
??str(j,1)+" "
endfor
for j=i-1 to 1 step -1
??str(j,1)+" "
endfor
endfor