uses crt;
var n,r,i,faktn,faktnr,faktr:longint;
sonuc:real;
begin
clrscr;
for n:=0 to 12 do
begin
faktn:=1;
faktnr:=1;
faktr:=1;
for r:=0 to n do
begin
for i:=0 to n do
begin
if (i=0) then faktn:=1
else faktn:=faktn*i;
if ((n-r)>=i) then
faktnr:=faktnr*i;
if (faktnr=0) then
faktnr:=1;
if (r>=i) then
faktr:=faktr*i;
if (faktr=0) then
faktr:=1;
end;
sonuc:=(faktn/(faktnr*faktr));
write(sonuc:5:0);
end;
write(' ');
writeln('');
end;
readln;
end.
Linkback: https://www.buyuknet.com/pascal-ucgeni-duz-siralanmis-hali-programi-t8639.0.html