function aprox_e=priklad1(n)
%aprox_e=priklad1(n)
%
% pocita priblizne hodnotu e pomoci 
% Taylorova polynomu fce e^x v bode 0 radu n

T_n = 1;
fact = 1;
for k = 1 : n
    fact = fact * k;
    T_n = T_n + 1 / fact; 
end

fprintf('Priblizna hodnota Eulerova cisla e spoctena Taylor. polynomem v bode 0 radu %d:  %f.\n', n, T_n)

aprox_e=T_n;

% konec