Sep18


Printing Fibonacci Sequence upto n digits using C++ image

The Fibonacci sequence is the series of numbers in a specific pattern such that the first number of the sequence is 0 and the second number of the sequence is 1. After that, every next number of the sequence is the sum of past two number of the sequence.

The Fibonacci sequence will look like this:
0, 1, 1, 2, 3, 5, 8, 13, 21, 34, ...

  • The 2 is found by adding the two numbers before it (1+1)
  • The 3 is found by adding the two numbers before it (1+2),
  • And the 5 is (2+3),
  • and so on

|0 |8

Be Cool!

If you have any other method in your mind, feel free to share us in the comments below. We will include it with this post along with your credits.

Method 1

Method 2

Using Recursion

Ads By Google - Turn it Off

Leave a Comment


gfhdg