subject
Mathematics, 02.10.2020 15:01 tanabugg

Can some one help me with this? I don't understand: The Fibonacci numbers are the numbers
\[
1,1,2,3,5,8,13,21,34\ldots
\]
where the first two numbers are 1 and 1, and each number after that is the sum of the two previous numbers. (So $2 = 1+1$, $3 = 2+1$, and so on.)

Write an algorithm, in English, that takes a positive integer $n$ as input and then outputs the $n$th Fibonacci number. For example, if we input to the algorithm $n=2,$ your algorithm should output 1. If we input $n=6,$ your algorithm should output 8.

Remember that an algorithm should consist of a series of unambiguous steps. Use variable names to identify what values you are referring to. You can assume that the computer can do basic arithmetic.

Above, we have given two input-output examples. Be sure to test your algorithm to see if it can successfully reproduce these examples and any others you care to test.
Thanks!

ansver
Answers: 3

Other questions on the subject: Mathematics

image
Mathematics, 20.06.2019 18:04, Rubendelarosa1529
Carl wants to buy a television that cost $500 including taxes. to pay for television he will use a payment plan that requires him to make a down payment of $125 and then pay $70.50 each month for six months what is the percent increase from the original cast of the television to the cost of the television using a payment plan.
Answers: 1
image
Mathematics, 21.06.2019 16:10, Tori122367
Convert 50 kilogram to pounds. (the conversion factor from kilogram to pound is 2.2046.) a. 52.2 lb. b. 110.2 lb. c. 22.6 lb. d. 47.8 lb.
Answers: 1
image
Mathematics, 21.06.2019 18:00, SuperWoman9172
When y’all answer can y’all explain too !
Answers: 1
image
Mathematics, 21.06.2019 18:30, daniel1480
Given: m∠ adb = m∠cdb ad ≅ dc prove: m∠ bac = m∠bca lol
Answers: 2
You know the right answer?
Can some one help me with this? I don't understand: The Fibonacci numbers are the numbers
\[<...

Questions in other subjects:

Konu
Mathematics, 11.05.2021 15:20