Write the algorithms to display the Fibonacci series and the factorial value for a given number using Pseudo code.
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   Â
Comments
Leave a comment