What is Fibonacci Series?

The Fibonacci series is the sequence where each number is the sum of the previous two numbers of the sequence. The first two numbers of the Fibonacci series are 0 and 1 and are used to generate the Fibonacci series.

In mathematical terms, the number at the nth position can be represented by:

Fn = Fn-1 + Fn-2

with seed values, F0 = 0 and F1 = 1.

For example, Fibonacci series upto 10 terms is: 0, 1, 1, 2, 3, 5, 8, 13, 21, 34

The Fibonacci programs in C that print the first n terms of the series can be coded using two methods specified below:

  • Fibonacci series using recursion
  • Fibonacci series using loops

Fibonacci Series Program in C

In this article, we will discuss the Fibonacci series and the programs to print the Fibonacci series in C using recursion or loops.

Similar Reads

What is Fibonacci Series?

The Fibonacci series is the sequence where each number is the sum of the previous two numbers of the sequence. The first two numbers of the Fibonacci series are 0 and 1 and are used to generate the Fibonacci series....

Fibonacci Series Program in C (Recursion)

In this method, we will use a function that prints the first two terms, and the rest of the terms are then handled by the other function that makes use of a recursive technique to print the next terms of the sequence....

Fibonacci Series Program in C (Iteration)

...