Saturday, July 28, 2012

nth Fibonacci Number

Assalamu Alaikum. Hope, you all are well by the grace of Almighty ALLAH. Today we learn how to find out the nth number of the Fibonacci series. Take a look at the problem.

Problem: Write a program that prints the nth term of Fibonacci number.



Solution: In a Fibonacci sequence, the sum of two successive terms gives the third term. Following are the first few terms of Fibonacci series....
   1  1  2  3  5  8  13  21  34  55  89.....

Take a look at the program....


Thank you all....

0 comments:

Post a Comment