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

PROGRAMMING:Find the sum of 1 + 1 / 2 + 1 / 3 + 1 / 4 +... + 1 / n

Luz5年前 (2021-05-10)题库398
Find the sum of 1 + 1 / 2 + 1 / 3 + 1 / 4 +... + 1 / n.
Requirements: enter a positive integer n, calculate the sum of the first N fractions, and the value range of n is [2100]. Output the final calculation result with two decimal places.
###Input format:
Enter a positive integer n, the value range of n is [2100].
###Output format:
Output the calculation result in one line, accurate to two decimal places.
###Input example:
```in
twenty
```
###Output example:
```out
three point six zero
```







answer:If there is no answer, please comment