Follow

Translate

Tuesday, March 15, 2016

FIBONACCI(FIB, N)

FIBONACCI(FIB, N)
This procedure calculates FN and returns the value in the first parameter FIB.


1.  If N = 0 or N = 1, then : Set FIB : = N, and return.

2. Call FIBONACCI(FIBA, N-2).

3. Call FIBONACCI(FIBB, N-1).

4.  Set  FIB : = FIBA + FIBB.

5.  Return.
If You want to learn about the technology, computer science & engineering, web programming, freelancing, earning please click here :CSE SOLVE

0 comments:

Post a Comment