|
|
|
@ -13,7 +13,7 @@ This function receives a number `n` and returns the `n`th number in the fibonacc
|
|
|
|
|
|
|
|
|
|
The Fibonacci Series starts like this: 0, 1, 1, 2, 3, 5, 8, 13 etc... |
|
|
|
|
|
|
|
|
|
### Usage |
|
|
|
|
### Usag |
|
|
|
|
|
|
|
|
|
Here is a possible test for your function: |
|
|
|
|
|
|
|
|
@ -21,7 +21,7 @@ Here is a possible test for your function:
|
|
|
|
|
use fibonacci2::fibonacci; |
|
|
|
|
|
|
|
|
|
fn main() { |
|
|
|
|
println!("The element in the position {} in fibonacci series is {}",2, fibonacci(2)); |
|
|
|
|
println!("The element in the position {} in fibonacci series is {}",2, fibonacci(2)); |
|
|
|
|
println!("The element in the position {} in fibonacci series is {}",4, fibonacci(4)); |
|
|
|
|
println!("The element in the position {} in fibonacci series is {}",22, fibonacci(22)); |
|
|
|
|
println!("The element in the position {} in fibonacci series is {}", 20, fibonacci(20)); |
|
|
|
|