Math, asked by dibanath5378, 11 months ago

The first two terms in the Fibonacci series are 0 and 1, respectively, and each subsequent term is the sum of the previous two. Using this definition, to calculate the first several terms in the sequence, we get: 0, 1, 1, 2, 3, 5, 8, 13, 21, 34, 55, 89, ... Build an algorithm for the same.

Answers

Answered by deepakpradhan614
36

Step-by-step explanation:

  1. Start
  2. Input Value of n from user
  3. Declare the values of a=0, b=1, count=1
  4. Write a, b
  5. If (count >n) then go to step 12
  6. next = a+b
  7. Write next
  8. a=b
  9. b=next
  10. count=count + 1
  11. Go to step 4
  12. Stop
Similar questions