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

PROGRAMMING:Finding the sum of the first n terms of an interleaved sequence

Luz5年前 (2021-05-10)题库394
This problem requires the preparation of procedures to calculate the sum of the first n terms of the interleaved sequence 1-2 / 3 + 3 / 5-4 / 7 + 5 / 9-6 / 11 +.
###Input format:
The input gives a positive integer n on one line.
###Output format:
Output the value of partial sum in one line, and keep the result to three decimal places.
###Input example:
```in
five
```
###Output example:
```out
zero point nine one seven
```






answer:If there is no answer, please comment