uses crt;
var
hasil:real;
baris:array[1..30,1..30] of integer;
procedure hitung;
var
l,k:integer;
begin
baris[2,1]:=1;
baris[2,2]:=1;
baris[2,3]:=1;
l:=1;
repeat
baris[l,1]:=1;
for k:=2 to l-1 do baris[l,k]:=baris[l-1,k-1]+baris[l-1,k];
baris[l,k+1]:=1;
l:=l+1;
until l>hasil;
end;
procedure tampil;
var
l,j,k:integer;
begin
l:=1;
repeat
for j:=1 to (35-2*(l-1)) do write(' ');
for k:=1 to l do
if (baris[l,k+1]<10)>hasil;
end;
begin
clrscr;
write('Input Batasan : ');
readln(hasil);
hitung;
tampil;
readln;
end.
Tidak ada komentar:
Posting Komentar