program ex;
uses wincrt;
var sum:real; j,x:integer;
function fac (n:integer): integer ;
var i: integer ;
begin
fac:=1;
for i:=1 to n do
fac:=fac(n-1)*i;
end;
function power (a,b:integer):integer;
begin
if b=1 then power:=a
else power:=a*power(a,b-1);
end;
begin
readln(x);
sum:=1;
for j:=1 to 10 do
begin
sum:=sum+power (x,j)/ fac (j);
end;
writeln (sum);
end.
Jumat, 09 Desember 2011
Langganan:
Posting Komentar (Atom)
0 komentar:
Posting Komentar