Answer to Question #296525 in Algorithms for chathurika

Question #296525

Write the algorithms to display the Fibonacci series and the factorial value for a given number using Pseudo code.


1
Expert's answer
2022-02-11T11:57:05-0500
Start
   Declare Intrger n
   Declare Array fibonacciSequence[]
   Display "Enter n: "
   Input n 
   fibonacciSequence[0] = 1
   fibonacciSequence[1] = 1
   for i = 2; i < n                
      fibonacciSequence[i] = fibonacciSequence[i - 1] + fibonacciSequence[i - 2]
   end for
   Display "Fibonacci Sequence: "
   for i = 2; i < n 
       Display fibonacciSequence[i]
   end for
Stop      

Need a fast expert's response?

Submit order

and get a quick answer at the best price

for any assignment or question with DETAILED EXPLANATIONS!

Comments

No comments. Be the first!

Leave a comment

LATEST TUTORIALS
New on Blog
APPROVED BY CLIENTS