%eks 10.1

n=4;
h=1/n;
y=zeros(n+1,1);
y(1)=1;

for i = 1:n
    y(i+1)=(1-h)*y(i);
end

disp(y(end)-exp(-1))