Algorithm and Pseudocode for Fibonacci series

What is Fibonacci Series?

A series of numbers in which each number is the sum of the two preceding or previous numbers is called Fibonacci Series.

For example, Fibonacci series upto 6 numbers is 1, 1, 2, 3, 5, 8, etc.

Pseudocode for Fibonacci Series:

Pseudocode for Fibonacci series
Step 1: Start Step 2: Declare variable a,b,c,n,i Step 3: Initialize variable a=1, b=1, i=2 Step 4: Read n from user Step 5: Print a and b Step 6: Repeat until i<n 6.1 c=a+b 6.2 print c 6.3 a=b, b=c 6.4 i=i+1 Stop 7: Stop

Fibonacci Series Flowchart:

Flowchart for Fibonacci Number series
Similar Posts:
  1. Algorithm For Prime Number
  2. Algorithm for Insertion Sort
  3. Selection Sort Algorithm and Flowchart
  4. Binary Search Algorithm
  5. Algorithm for Factorial of a Number

Solution Worked 3 UpvotesUpvote
Solution Didn't Worked 1 DownvotesDownvote