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

PROGRAMMING:Finding the sum of the first n Fibonacci sequences

Luz5年前 (2021-05-10)题库372
Function: find the sum of the first n terms of Fibonacci sequence with function.
Note: Fibonacci sequence is the first value of the sequence is 1, and the second value is also 1. Starting from the third term, each term is the sum of two adjacent terms in front of it.
Note: the result value is controlled in the range of long type.
###Input format:
Enter an integer n, 3 < = n < = 40.
###Output format:
Output the sum of the first n Fibonacci sequences
###Input example:
```in
twenty-eight
```
###Output example:
```out
eight hundred and thirty-two thousand and thirty-nine
```







answer:If there is no answer, please comment