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

PROGRAMMING:π Approximate value of

Luz5年前 (2021-05-10)题库392
In this topic, we need to write a program, which can be calculated by $$frac {PI} {4} = 1 - [frac {1} {3} + [frac {1} {5} - [frac {1} {7} +... $ π Until the absolute value of the last term is less than EPS, output π The value of.
###Input format:
Enter EPS (EPS < = 1e-2) in one line.
###Output format:
Output pi = s in one line, s is in EPS precision π The approximate value of, the result retains 6 decimal places.
###Input example:
```in
zero point zero zero zero one
```
###Output example:
```out
pi=3.141793
```







answer:If there is no answer, please comment