Download source code
ANALYSIS
Tribe of the n-th Fibonacci sequence i get with the formula:
Fibonacci (n) = Fibonacci (n-1) + Fibonacci (n-2)
with initial value for n = 1 and n = 2 valuable 1
ALGORITHM
Fibonacci function (input n: integer): integer
DESCRIPTION
if (n = 1) or (n = 2) then the Fibonacci <- 1else Fibonacci <- Fibonacci (n-1) + Fibonacci (n-2)endifdowload
0 comments:
Post a Comment