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]
2 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]2 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
Country Motorbikes Incorporated finds that it costs $400 to produce each motorbike, and that fixed costs are $1600 per day. The
faltersainse [42]

Answer:

30units,2900

Step-by-step explanation:

Given that Country Motorbikes Incorporated finds that it costs $400 to produce each motorbike, and that fixed costs are $1600 per day.

The price function is p(x) = 700 − 5x, where p is the price (in dollars) at which exactly x motorbikes will be sold.

If x units are produced and sold we have

Costs for x units = variable costs *x +Fixed costs = 400x+1600

Sales revenue = no of units sold * price = x(700-5x) = 700x-5x^2

Profit funciton = P(x) = Sales revenue - Total cost

= 700x-5x^2-400x-1600\\=300x-5x^2-1600

To get maximum profit we use derivative test I derivative =0 and II derivative =negative

P'(x) = 300-10x\\p"(x) = -10

Producing 30 units will maximize the profit.

Max profit

=P(30) = 2900

8 0
3 years ago
Round -13.457 to nearest integer
fomenos

Answer:

Answer:

-13

Step-by-step explanation

Rounded to the nearest 0.01 or

the Hundredths Place.

5 0
2 years ago
Daniel runs 40/5 miles in 124/₁ minutes. What is the unit rate in terms of miles per minute? What the answer:
sasho [114]

Using the given information, the unit rate is 0.0645 miles/minute

<h3>Calculating rate </h3>

From the question, we are to determine the unit rate

From the given information,

Daniel runs 40/5 miles in 124 minutes

That is,

Distance = 40/5 miles = 8 miles  

Time = 124 minutes

Using the formula,

Rate = Distance / Time

Rate = 8 miles / 124 minutes

Rate = 0.0645 miles/minute

Hence, the unit rate is 0.0645 miles/minute

Learn more on Calculating rate here: brainly.com/question/1090517

#SPJ1

3 0
2 years ago
Read 2 more answers
Please help, answer asap
Vladimir79 [104]
I needed help with that too
8 0
3 years ago
Read 2 more answers
What is the solution of <br> x/2=6
Lina20 [59]

Answer:

12

Step-by-step explanation:

12/2=6

replace x with 12

4 0
2 years ago
Read 2 more answers
Other questions:
  • Aria drank 500 milliliters of water after her run.Her best friend Andrea drank 0.75 of liter of water.Who drank more?
    14·1 answer
  • Which is the graph of 3x-2y=6
    10·2 answers
  • HELP!
    14·2 answers
  • Choose the equation that could be used to find two consecutive integers whose sum is 67.
    13·1 answer
  • Ccompares 3.67( )36.7
    6·1 answer
  • Jennifer is 20 miles north of her house, and she is driving north on the highway at a rate of 55 miles per hour whats the slpoe
    8·1 answer
  • Simplify:<br><br> (-1/4 - 1/2)divided by (-4/7)?
    9·1 answer
  • The average score on mid term examination of 25 students was 78.8 out 100
    8·1 answer
  • I need help with this
    5·1 answer
  • -(-2) <br> ...................................................
    12·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!