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
How do you find slope given on a graph?
oee [108]
You use rise over run. So you first count the rise( how many upwards is the point) then count the run( how many to the right or left is the point)
7 0
3 years ago
Please can you simplify -x+2z+x+2y
slavikrds [6]

Answer:

2y + 2z

Step-by-step explanation:

-x + 2z + x + 2y

= (-1 + 1)x + 2y + 2z

= 2y + 2z

Hope this helped!

3 0
3 years ago
Please answer!! I’ll mark Brainiest!! Anika is on the crew to set up rides for the state fair. The crew does most of the setup o
fiasKO [112]

Answer:

Step-by-step explanation:

Answer:

(a) We will form an equation of line from the points given (6,10) and (2,15)

Using:

On substituting the values in the formula above we will get the required equation of line.

On simplification we will get:

(b) We need to tell at day 0 put x=0 in above equation:

Anika worked for 70 hours on the set up crew on the day the fair arrived at the fairgrounds day 0.

Now, we need to tell decrease per day which is equal to the slope of line

To find the slope compare the equation with general equation which is y=mx+c where m is slope

Here, in

 which is the decrease per day.

7 0
3 years ago
Which matrix translates the vector 〈4,-3〉 to 〈6,-8〉?
Mars2501 [29]

Answer:

2, -5

Step-by-step explanation:

3 0
3 years ago
Hong compared the player statistics from his teams tennis season. He determined that being taller implies that a player has fast
polet [3.4K]

There is a correlation between height and speed of the serve

<h3>How to interpret the player statistics?</h3>

From the question, we understand that:

The taller a player, the faster the serve

This means that:

Height implies speed

In other words, there is correlation between the height and the speed of the service

Read more about correlation at:

brainly.com/question/4219149

#SPJ1

4 0
2 years ago
Other questions:
  • I need help with this question fast please
    15·2 answers
  • PLEASE PLEASE HELP IM ABOUT TO FAIL I REALLY NEED A GOOD ANSWER
    7·1 answer
  • Find the equation in slope-intercept form that describes a line through (4, 2) with slope 12
    8·2 answers
  • A 10-foot ladder is learning against wall. The base of the ladder is 2 feet from the base of the building. How far up the buildi
    11·1 answer
  • Find the equation of the quadratic function with zeros 10 and 12 and vertex at (11, -2).
    11·1 answer
  • Determine whether or not the following question can be considered as a statistical question.
    12·2 answers
  • 2. A painting is sold for $1,400, and its value
    12·1 answer
  • If a transformation is performed on a polygon, the original polygon is called what?
    9·2 answers
  • Number 11 on my integrated geometry test
    8·1 answer
  • In hong kong a block of flats has 37 floors.There are 16 flats on each floor and 4 people live in each flat. The number of peopl
    12·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!