1answer.
Ask question
Login Signup
Ask question
All categories
  • English
  • Mathematics
  • Social Studies
  • Business
  • History
  • Health
  • Geography
  • Biology
  • Physics
  • Chemistry
  • Computers and Technology
  • Arts
  • World Languages
  • Spanish
  • French
  • German
  • Advanced Placement (AP)
  • SAT
  • Medicine
  • Law
  • Engineering
Sergeeva-Olga [200]
3 years ago
7

Complete computefibonacci() to return fn, where f0 is 0, f1 is 1, f2 is 1, f3 is 2, f4 is 3, and continuing: fn is fn-1 + fn-2.

hint: base cases are n == 0 and n == 1.
Mathematics
1 answer:
anastassius [24]3 years ago
3 0

Answer:

Fibonacci series is given by

f(0)=0, f(1)=1, f(2)=1, f(3)=2, f(4)=3.....

As you can see using the above result

f(4)=f(3) + f(2),

f(3)=f(2) + f(1),

f(2)=f(1) + f(0)

Proceeding using same pattern

f(5)=f(4) + f(3)=3+2=5

f(6)=f(4) + f(5)=3+5=8

f(7)=f(6) + f(5)=8+5=13

f(8)=f(7) + f(6)=13+8=21

f(9)=f(8) + f(7)= 21+13=34

f(10)=f(9) + f(8)=34+21=55

...........................................

..........................................

f(n-2)=f(n-3)  + f(n-4)

f(n-1)=f(n-2)+ f(n-3)

Similarly and finally we get using the same pattern we get, As given f(n)=f(n-1) + f(n-2).




You might be interested in
Help PLEASE THE LINK IS DOWN BELOW I TIMES
Mamont248 [21]
The answer is A because its simple reading. Are you 4? Because this is easy smh
3 0
3 years ago
.48 ÷ 9.23 round to nearest tenth
Arisa [49]
The correct answer is
.05
3 0
3 years ago
Read 2 more answers
Hey uhm can someone answer this for 12 points
MAXImum [283]

\frac{0.2x - 3.2}{5}  = 1.8 \\ 0.2x - 3.2 = 1.8 \times 5 \\ 0.2x - 3.2 = 9 \\ 0.2x = 9 + 3.2 \\ 0.2x = 12.2 \\ x =  \frac{12.2}{0.2}  \\ \boxed{ x = 61}

4 0
2 years ago
Read 2 more answers
Find the volume of a cylinder whose height is 7 cm and radius is 10 cm​
Karolina [17]

Question

find the volume of a cylinder whose height is 7 cm and radius is 10 cm​Answer:soln

volume of cylinder= pie r ^h where pie = 22/7

height=7 cm

radius=10 cm

now,

volume of cylinder= 22/7*10*10*7cm

V≈2199.11cm³

3 0
2 years ago
How does a reflection affect the properties of a two-dimensional figure ?
saveliy_v [14]
It affects it because if their was a mirror in front of a sheet of paper it would most likely appear in the opposite side of the mirror depending on the angle it’s at.

Please tell me if I’m correct I hope this help you
3 0
3 years ago
Other questions:
  • 10x^3+40x^2+15x<br>------------------------------<br> 5x<br>​
    10·1 answer
  • Triangle ABC is similar to triangle XYZ. Which of the following proportions is correct?
    8·2 answers
  • What are the coordinates of the terminal point determined by t= 11 pi / 3
    5·2 answers
  • sophia earned $52 at her job when she workd for 2 hours. what was her hourly pay rate in hours per dollar?
    10·1 answer
  • One box of printer paper has 3x102 sheets of paper.Another box has 103 sheets of paper.What total number of sheets in both boxes
    9·1 answer
  • Anyone know this? Ill give brainliest if right pls help ^^!!!
    14·2 answers
  • please help expert help please! giving 16 points please help! will mark brainliest! Please do question 3!!! love y’all!
    5·1 answer
  • Chase bought 5 chicken wings for $9.50. If Chase spent $26.60 , how many chicken wigs did he buy ?
    11·1 answer
  • Whst is the correlation coefficient for the data shown in the table​
    5·1 answer
  • Question 4 of 10
    12·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!