vfp编程题求救

来源:百度知道 编辑:UC知道 时间:2024/06/08 16:02:18
@
@@
@@@
@@@@
@@@@@
@
@@
@@@
@@@@
@@@@@
第二个是金字塔状的,这里显示错了。。。

clear
for i=1 to 5
?repl("@",i)
endf
for i=1 to 5 step 1
?space(5-i)+repl("@",i)
endf
return

不加空格,坐标不对,不好排列成品字形

for aa=1 to 5
?repl('@ ',aa)
endfor

for aa=0 to 10 step 2
?space(10-aa/2),repl('@ ',aa/2)
endfor