Program Belah_Ketupat;
uses wincrt;
var
N,i,j,k : integer;
begin
writeln('=========== PROGRAM BELAH KETUPAT =============');
write ('Masukkan Batas : ');readln(N);
writeln;
begin
for i := 1 to N do
begin
for k := (N-1) downto i do
begin
write (' ');
end;
for j:= 1 to i do
begin
write('*',' ');
end;
begin
for j:=(i-1) downto 1 do
write('*',' ');
end;
writeln('');
end;
begin
for i := (N-1) downto 1 do
begin
for k := (N-1) downto i do
begin
write(' ');
end;
for j := i downto 1 do
begin
write ('*',' ');
end;
begin
for j := 1 to (i-1) do
write('* ');
end;
writeln(' ');
end;
end;
end;
end.
0 komentar:
Posting Komentar