主题:[讨论]给点意见吧!~~
输入行数(奇数)
3
***
22222
*******
111111111
***********
111111111
*******
22222
***
3
input n
a=n\2
for i = -a to a
b=abs(i)
x=(a+1)-b
c=(b+1)/2
print tab(30-x);
if b mod 2<> 0 then
print string$(2*x-1,ltrim$(str$(c)))
else
print string$(2*x-1,"*")
end if
next i
end
3
***
22222
*******
111111111
***********
111111111
*******
22222
***
3
input n
a=n\2
for i = -a to a
b=abs(i)
x=(a+1)-b
c=(b+1)/2
print tab(30-x);
if b mod 2<> 0 then
print string$(2*x-1,ltrim$(str$(c)))
else
print string$(2*x-1,"*")
end if
next i
end