主题:[活动]016565
016565
[专家分:0] 发布于 2009-07-02 17:24:00
输出
*
***
*****
*******
*****
***
*
回复列表 (共2个回复)
沙发
FFKK [专家分:1610] 发布于 2009-07-02 17:33:00
cls
for i=1 to 4
print tab(21-i);
for j=1 to 2*i-1
print "*";
next j
next i
for i=3 to 1 step -1
o=23
print tab(o-i)
o=o-2
for j=1 to 2*i-1
print "*";
next j
next i
end
板凳
1054122 [专家分:750] 发布于 2009-07-02 18:16:00
CLS
n = 7
n = n \ 2 + 1
FOR i = 1 TO n
PRINT SPC(n - i);
FOR j = 1 TO i * 2 - 1
PRINT "*";
NEXT j
PRINT
NEXT i
FOR i = n - 1 TO 1 STEP -1
PRINT SPC(n - i);
FOR j = 1 TO i * 2 - 1
PRINT "*";
NEXT j
PRINT
NEXT i
END
我来回复