Fibonacci series in C using for loop and Recursion

This is my first post on this blog so i thought i should start with easy one. While learning i am 100% sure that everybody might have done this Fibonacci series in different programming language. C is my first programming language and also it’s very easy to understand for any beginner so i will explain this problem using C.Fionacci Series

What is Fibonacci Series ?

In mathematics, the Fibonacci numbers or Fibonacci sequence are the numbers in the following integer sequence

By definition, the first two numbers in the Fibonacci sequence are 1 and 1, or 0 and 1, depending on the chosen starting point of the sequence, and each subsequent number is the sum of the previous two.

For example 13 is sum of previous two numbers 8 and 5 and so on. So i will not waste you time and share the code.

Fibonacci series in C programming using for loop

Fibonacci series in C programming using Recursion

Note : Recursive method uses stack , so if you are calculating series for large number frequently, may be you will get stack overflow error.

Please let me know your idea suggestion in the comment.

Related Post

1 Comment


  1. how do i get the program to find prime numbers in the Fibonacci series?

    Reply

Leave a Reply

Your email address will not be published. Required fields are marked *