Skip to content

QueryCrew/P5-FibonacciSequence

 
 

Repository files navigation

Fibonacci Sequence

Write A Program To Print The Fibonacci Sequence.

Fibonacci Sequence:

In mathematics, the Fibonacci numbers, commonly denoted Fn, form a sequence, called the Fibonacci sequence, such that each number is the sum of the two preceding ones, starting from 0 and 1. The sequence starts: 0, 1, 1, 2, 3, 5, 8, 13, 21, 34, 55, 89, 144, ....
The next number is found by adding up the two numbers before it:

  • 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)
  • the 5 is (2+3), and so on!

Input:

Enter number of elements required : 4

Output:

Fibonacci Sequence for 4 elements is : 0, 1, 1, 2

About

Program To Print The Fibonacci Sequence

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • JavaScript 32.4%
  • C++ 29.1%
  • Java 24.8%
  • Python 13.7%