PROGRAM BELAH_KETUPAT;
uses wincrt;
var
N,i,j,k : integer;
begin
writeln('----- PROGRAM BELAH KETUPAT ANGKA ----');
writeln;
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(j,' ');
end;
begin
for j:=(i-1) downto 1 do
write(j,' ');
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 (j,' ');
end;
begin
for j := 1 to (i-1) do
write(j,' ');
end;
writeln(' ');
end;
end;
end;
end.
==========================================>>
RUNNING PROGRAM:
bro
ReplyDeletebegin
for b := 1 to (a-1) do
write(b,' ');
end;
sama
for j := 1 to (i-1) do
write(j,' ');
end;
kayaknnya kebalik deh for dalam for nomor 2 dan 3 yang bawah itu
maap. belum q setting lagi. hehehehehe. mkasih.
Delete