Uses wincrt;
var i,j,n : integer;
Begin
clrscr;
n := 5;
for i:=1 to n do
begin
if i < n then
begin
for j:=1 to (n-i) do
write(' ');
for j:=1 to i do
write(' *');
writeln;
end;
end;
n := 5;
for i:=n downto 1 do
begin
if i <= n then
begin
for j:=1 to (n-i) do
write(' ');
for j:=1 to i do
write(' *');
writeln;
end;
end;
end.
0 comments:
Post a Comment