Print First n numbers in Fibonacci Series

Objective: Write a program to print first n numbers in Fibonacci series.

Fibonacci number: First two Fibonacci numbers are defined as 0 and 1 and every number after the first two is the sum of the two preceding ones

Fibonacci Sequence- 0 1 1 2 3 5 8 13 21 34 55 89 ……..

Code:

Output:

First 10 elements in fibonacci series are:
0 1 1 2 3 5 8 13 21 34

__________________________________________________
Top Companies Interview Questions..-

Google Microsoft Amazon Facebook more..

If you find anything incorrect or you feel that there is any better approach to solve the above problem, please write comment.
__________________________________________________

%d bloggers like this: