Description Usage Arguments Value Author(s) Examples
View source: R/fibonacci-recursion.R
This function returns the Fibonacci number at a given position using recursion method
1 |
n |
A position for which the Fibonacci number is desired |
A Fibonacci number at a given position
Som Bohora
1 2 3 4 5 | compute_fibonacci(5)
n = 10
for (i in 0:(n-1)) {
print(compute_fibonacci(i))
}
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.