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

PROGRAMMING:C language experiment Fibonacci number

Luz5年前 (2021-05-10)题库428
Fibonacci number is defined as:
f(0) = 0;
f(1) = 1;
F (n) = f (n-1) + F (n-2). Integers with n > 1
If you write a series of Fischer numbers, it should be:
0 1 1 2 3 5 8 13 21 34 ...
If the sixth item is found, it should be 8.
Find the number of the nth term.
###Input format:
The input data contains no more than 50 positive integers n (0 ≤ n ≤ 46).
###Output format:
For each n, calculate the n-th fisher number, and each result should occupy a separate line.
###Input example:
Here is a set of inputs. For example:
```in
6 10
```
###Output example:
The corresponding output is given here. For example:
```out
eight
fifty-five
```







answer:If there is no answer, please comment