• Tutorials
  • DSA
  • Data Science
  • Web Tech
  • Courses
August 08, 2022 |1.6K Views

C Program for Fibonacci Series

Description
Discussion

In this video, we will write a C Program to Print the Fibonacci Sequence. 

In maths, the sequence Fn of Fibonacci numbers is defined by the recurrence relation Fn = Fn- 1 Fn- 2 with seed values F0 = 0 and F1 = 1 

Examples:

Input 6th term 
Output 8 

Input 7th term 
Output 13

As the first Fibonacci number is 0 and the second is 1. 

Also, we know that the last Fibonacci number is the aggregate of n- 1 and n- 2 term. 

So, to get the utmost Fibonacci term we can follow 
fib( 1) = 0 
fib( 2) = 1 
fib( 3) = fib( 2) fib( 1) 
fib( 4) = fib( 3) fib( 2)
fib( n) = fib( n- 1) fib( n- 2) 

C Program for fibonacci series:
https://www.geeksforgeeks.org/c-program-for-fibonacci-numbers/