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
Charra [1.4K]
3 years ago
6

Fill in the code to complete the following function for computing a Fibonacci number. public static int fib(int index) { if (ind

ex == 0 || index == 1) // Base case ________ else // Reduction and recursive calls return fib(index - 1) + fib(index - 2); }
Mathematics
1 answer:
Lubov Fominskaja [6]3 years ago
6 0

Answer:

return 0;

Step-by-step explanation:

The  Fibonacci numbers such that each number is the sum of the two preceding ones, but the first therm of the sequence cannot be built by this rule.

In that F_{0} = 0

Then you may define it in the base case

return 0;

You might be interested in
<img src="https://tex.z-dn.net/?f=%20%20%7Bx%7D%5E%7B2%7D%20%20%3D%20%20%7B16%7D%5E%7Bx%7D%20" id="TexFormula1" title=" {x}^{2}
aalyn [17]
The value of x is -1/2 or -.5
4 0
3 years ago
An inscribed angle that intercepts a semicircle measures is a(n) ———- angle
Ber [7]

Answer:

c) right

Step-by-step explanation:

7 0
3 years ago
Read 2 more answers
Make an equation that is equal to 2/3
wariber [46]

Answer:

Replace the 4 with a 3 to make the equation true

5 0
3 years ago
Read 2 more answers
You repay a bank $480 in three months for a loan. What are your monthly payments to the bank?
insens350 [35]

Answer:

160 dollars per month

Step-by-step explanation:

Well you know the total amount paid is 480 dollars and payments are made once a month for three months.

Divide 480 by three to find the amount paid per month

480/3=160

160 dollars per month

7 0
3 years ago
The ratio of girls to boys in Mr. Smith's homeroom is 3:4. The ratio in Mr. Smith's homeroom to students in the whole 7th grade
Leno4ka [110]

3:4 = G:B

1:5 = Mr. Smith's class: 7th Grade

2:7= 7th: Middle school

12 girls = 3 units

1 unit = 12/3= 4

Boys = 4x4= 16

<em>Whole class = 28 students</em>

Class : Grade = 1:5     <em> 7 = number of units in  Mr. Smith's class</em>

28 = 1 unit

5 units= 28x5= 140 <em>There are 140 kids in the grade</em>

140 = 2 units

1 unit = 140/2= 70

70x7=490

<u><em>There are 490 students in the whole grade</em></u>



6 0
3 years ago
Other questions:
  • Three consecutive numbers have a sum of 18. *
    9·1 answer
  • How many bags of grapes had a weight of 3/8 pounds or less?
    7·1 answer
  • If a circle has an diameter of 14, what would the area be? <br> Use 3.14 for Ï€
    10·1 answer
  • What is the area of a parallelogram with a base of 0.56 cm and a height of 0.33 cm (to the nearest hundredths)? A) 0.18 cm2 B) 0
    12·2 answers
  • Can you solve this ? Thanks
    11·1 answer
  • How do you find the quadratic function with vertex (-2,5) and point (0,9)?
    11·1 answer
  • Write nine hundred and eight tenths as a decimal number.
    10·1 answer
  • Guided Practice #3:
    10·1 answer
  • 4(x - 7) = 4x - 28
    8·2 answers
  • The top one is the last one I need help plz
    11·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!