Selasa, 01 Januari 2013
Program Belah Ketupat Pada Pascal
Program Deret_BelahKetupat;
Uses Crt;
var a,b,c,d,e:integer;
i :string;
begin
ClrScr;
write ('Masukan Angka ?');readln (b);
for a:= 1 to b do
begin
c:= 1;
for e:= 1 to (b-a) do
begin
write(' ');
end;
while (c<=2) do
begin
for d:= 1 to a do
begin
write(d);
end;
c:=c+1;
end;
writeln;
end;
for a:=b downto 1 do
begin
c:=1;
for e:=1 to (b-a) do
begin
write(' ');
end;
while (c<=2) do
begin
for d:=1 to a do
begin
write(d);
end;
c:=c+1;
end;
writeln;
end;
readln;
end.
Langganan:
Posting Komentar (Atom)
Tidak ada komentar:
Posting Komentar