-->
当前位置:首页 > 题库

PROGRAMMING:Find the approximate value of e whose error is less than the input value

Luz5年前 (2021-05-10)题库356
The natural constant e can be expressed as Series $$1 + \ frac {1} {1!}+\ frac{1}{2!}+...+\ frac{1}{n!}$$ To approximate the calculation$$ e_{ i} $$represents the sum of the first $$I $. Enter the error range $$error $, when $$e_{ i+1}-e_{ i} < error $$, the approximate value of calculation is $$E_{ If I + 1} $$satisfies the error range, output this approximate value $$E_{ I + 1} $.
###Input format:
Enter the error range on one line.
###Output format:
Output the approximate value of E on one line (keep 6 decimal places).
###Input example:
```in
zero point zero one
```
###Output example:
```out
two point seven one six six six seven
```







answer:If there is no answer, please comment