subject
Mathematics, 30.06.2020 02:01 Tayannamorgan2373

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.

ansver
Answers: 2

Other questions on the subject: Mathematics

image
Mathematics, 21.06.2019 15:50, JesuGranger
Plz help plz give me the answer
Answers: 1
image
Mathematics, 21.06.2019 16:40, jsmith4184
Ajar contains a mixture of 20 black marbles, 16 red marbles, and 4 white marbles, all the same size. find the probability of drawing a white or red marble on the first draw. 125 12 01 next question ask for turn it in
Answers: 2
image
Mathematics, 21.06.2019 22:00, nancysue1975
How many ordered pairs of positive integers satisfy xy=32?
Answers: 1
image
Mathematics, 21.06.2019 22:30, Calmalemi
Marquise has 200 meters of fencing to build a rectangular garden. the garden's area (in square meters) as a function of the garden's width w w (in meters) is modeled by: a ( w ) = − w 2 + 1 0 0 w a(w)=−w 2 +100w what side width will produce the maximum garden area? meters
Answers: 1
You know the right answer?
The Fibonacci numbers are the numbers \[ 1,1,2,3,5,8,13,21,34\ldots \] where the first two numbers a...

Questions in other subjects: