matematik islem
uses crt;
var
a,b,d:byte;
{Faktoriyel bulunur}
function fak(i:byte):integer;
var
g:integer;
j:byte;
begin
g:=1;
for j:=1 to i do
g:=g*j;
fak:=g;
end;
{Combinezon alinir}
function com(s,u:byte):integer;
begin
com:=fak(s) div (fak(u)*fak(s-u));
end;
{(x+y)^ acilimi hesaplanir}
function acilim(x,y,n:byte):longint;
var
k,l,i,j:byte;
e,f:integer;
c:longint;
begin
k:=0; c:=0; l:=n;
for i:=1 to n+1 do
begin
e:=1; f:=1;
for j:=1 to n do
e:=e*x;
for j:=1 to k do
f:=f*y;
if ((n<>0) and (k<>0)) then
c:=c+(com(l,k)*(e*f))
else
c:=c+(e*f);
n:=n-1; k:=k+1;
end;
acilim:=c;
end;
begin
clrscr;
write('X de§erini girin '); readln(a);
write('Y de§erini girin '); readln(b);
write('ussu girin '); readln(d);
writeln('sonuc =',acilim(a,b,d));
readkey;
end.