Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- program olol;
- var
- i,j,n: integer;
- begin
- readln(n);
- for i:=1 to n+1 do
- begin
- for j:=1 to n-i+1 do
- write(' ');
- for j:=0 to i-1 do begin
- write(j); if i<>1 then write(' ');
- end;
- for j:=i-2 downto 0 do begin
- write(j); if j <>0 then write(' ');
- end;
- writeln;
- end;
- for i:=n downto 1 do
- begin
- for j:= 1 to n-i+1 do
- write(' ');
- for j:=0 to i-1 do begin
- write(j); if i<>1 then write(' ');
- end;
- for j:=i-2 downto 0 do begin
- write(j); if j <>0 then write(' ');
- end;
- writeln;
- end;
- end.
Add Comment
Please, Sign In to add comment