x=input('enter how close you want to get to e with (1+1/n)^n') u=exp(1); count=1; y=(1+(1/count))^count; while (abs(y-u)>=x) count=count +1; y=(1+(1/count))^count; end fprintf('we needed %d computations to get within %f of e\n',count,x)