subject
Mathematics, 24.02.2020 21:29 rileyeddins1010

The Fibonacci series: 0, 1, 1, 2, 3, 5, 8, 13, 21, has as its first 2 values, 0 and 1; each successive value if then calculated as the sum of the previous two values. The first element in the series is the 0'th element, thus the value 8 is element 6 of the series. The n'th element of the series, written as fib(n), is thus defined as:
n if n = 0 or n = 1
fib(n-1) + fib(n-2)

Write the int -valued function fib, that takes a single int parameter (say n), and recursively calculates and then returns the n'th element of the Fibonacci series.

ansver
Answers: 2

Another question on Mathematics

question
Mathematics, 21.06.2019 13:30
Which expression is factored form? x^2+14x+48 a) (x-8)(x-6) b) (x+6)(x-8) c) (x+8)(x-6) d) (x+6)(x+8)
Answers: 1
question
Mathematics, 21.06.2019 15:30
What is the value of y? round to the nearest tenth
Answers: 2
question
Mathematics, 21.06.2019 17:30
What is the shape of the height and weight distribution
Answers: 2
question
Mathematics, 21.06.2019 21:30
This is a map of the mars exploration rover opportunity predicted landing site on mars. the scale is 1cm : 9.4km. what are the approximate measures of the actual length and width of the ellipse? i mostly need to know how to set it up : )
Answers: 3
You know the right answer?
The Fibonacci series: 0, 1, 1, 2, 3, 5, 8, 13, 21, has as its first 2 values, 0 and 1; each successi...
Questions
question
Computers and Technology, 17.11.2020 01:00
question
Mathematics, 17.11.2020 01:00
question
Computers and Technology, 17.11.2020 01:00
question
Health, 17.11.2020 01:00
question
Mathematics, 17.11.2020 01:00
Questions on the website: 13722363