This C program prints out the first Fibonacci series of N numbers. In mathematics, the Fibonacci numbers are a sequence of numbers named after Leonardo of Pisa, known as Fibonacci. The first number of the sequence is 0, the second number is 1, and each subsequent number is equal to the sum of the previous two numbers of the sequence itself, thus creating the sequence 0, 1, 1, 2, 3, 5, 8, etc. The standard form of writing Fibonacci series is:

xn = xn-1 + xn-2

where:

  • xn is term number “n”
  • xn-1 is the previous term (n-1)
  • xn-2 is the term before that (n-2)
Fibonacci Numbers

Fibonacci Numbers

So this program prints the N numbers of Fibonacci series on the screen where N is the integer number entered by the user.

Output of the C Program