Fibonacci Sequence Flowchart
In the previous video of Fibonacci sequence ,we learned about the
Fibonacci series and how to write an algorithm. In this video we will learn how to draw a flowchart for it. First let us write an algorithm for it again.
0,1,1,2,3,5,8,13,21,34,55,89,…
Step1: Input the number(n) till which the Fibonacci series will run
Step2: Assign the variables a equal to -1 and b equal to 1
Step3: Add the variables a & b and assign it to variable x
Step4: Display the value of x
Step5: Assign the value of b to variable a
Step6: Assign the value of x to variable b
Step7: Subtract one from n and store it to variable n
Step8: If the value of n is not zero, go back to the Step3
Step9: Fibonacci numbers displayed till n numbers.
Fibonacci series and how to write an algorithm. In this video we will learn how to draw a flowchart for it. First let us write an algorithm for it again.
0,1,1,2,3,5,8,13,21,34,55,89,…
Step1: Input the number(n) till which the Fibonacci series will run
Step2: Assign the variables a equal to -1 and b equal to 1
Step3: Add the variables a & b and assign it to variable x
Step4: Display the value of x
Step5: Assign the value of b to variable a
Step6: Assign the value of x to variable b
Step7: Subtract one from n and store it to variable n
Step8: If the value of n is not zero, go back to the Step3
Step9: Fibonacci numbers displayed till n numbers.
To see the working of above flowchart,
Click here to Watch on YouTube
Download the Fibonacci Sequence Android App here
Comments
Post a Comment