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

Another question on Mathematics

question
Mathematics, 21.06.2019 15:30
Adepartment store purchases screen-printed t-shirts at a cost of $5 per shirt. they mark up the price 150% (making the selling price 250% of the store's purchase price) and put them on the sales floor. every month that a t-shirt doesn't sell, the store reduces the selling price by 25%.
Answers: 3
question
Mathematics, 21.06.2019 16:00
Find the equation of the trend line (line of best fit). show your work i'm using the points (34,76) (42,91)
Answers: 2
question
Mathematics, 21.06.2019 19:30
The revenue each season from tickets at the theme park is represented by t(c)=5x. the cost to pay the employees each season is represented by r(x)=(1.5)^x. examine the graph of the combined function for total profit and estimate the profit after four seasons
Answers: 3
question
Mathematics, 22.06.2019 03:00
More than 450450 students traveled to a state park for a field trip. the school allowed 66 students to travel by car, and the rest traveled on 1111 buses, each of which held the same number of students. if there were ss students in each bus, which inequality best represents this situation?
Answers: 1
You know the right answer?
Can some one help me with this? I don't understand: The Fibonacci numbers are the numbers
\[<...
Questions
question
Mathematics, 14.04.2020 00:34
question
Chemistry, 14.04.2020 00:35
question
Social Studies, 14.04.2020 00:35
question
Mathematics, 14.04.2020 00:35
Questions on the website: 13722367