Saturday 8 April 2017

Algorithm to Print Fibonacci Series up to a Limit

Step 1 : Start
Step 2 : Read Limit
Step 3 : Print 0 1
Step 4 : f1 = 0,f2 = 1 ,c = 1
Step 5 : if c <=  Limit  ,then go to Step 6 
             else go to Step 11
Step 6 : f = f1 + f2
Step 7 : print f
Step 8 : f1 = f2
Step 9 : f2 = f
Step 10 : c = c + 1 go to Step 5 
Step 11 : Stop

No comments:

Post a Comment

How to Invert an SVG image using CSS ?

You can invert your svg easily by using following css code svg { -webkit-filter: invert(100%); /* safari 6.0 - 9.0 */ filter...