Fibonaccin function n is an integer The function returns the

Fibonacci(n) function. n is an integer. The function returns the nth Fibonacci number. If you do not know what the n-th Fibonacci number is, study it on a Wikipedia page. You must use accumulator variables in your solution. Do not use simultaneous assignment. Write also test() function to list the first 20 Fibonacci numbers in which numbers are precisely RIGHT JUSTIFIED as illustrated in the following (Blackboard may not show the output precisely. Stick to the RIGHT-JUSTIFIED requirement): Nth Fibonacci number The 1th Fibonacci number is 1. The 2th Fibonacci number is 1. The 3th Fibonacci number is 2. The 4th Fibonacci number is 3. The 5th Fibonacci number is 5. The 6th Fibonacci number is 8. The 7th Fibonacci number is 13. The 8th Fibonacci number is 21. The 9th Fibonacci number is 34. The 10th Fibonacci number is 55. The 11th Fibonacci number is 89. The 12th Fibonacci number is 144. The 13th Fibonacci number is 233. The 14th Fibonacci number is 377. The 15th Fibonacci number is 610. The 16th Fibonacci number is 987. The 17th Fibonacci number is 1597. The 18th Fibonacci number is 2584. The 19th Fibonacci number is 4181. The 20th Fibonacci number is 6765.

Solution

output:

 Fibonacci(n) function. n is an integer. The function returns the nth Fibonacci number. If you do not know what the n-th Fibonacci number is, study it on a Wiki

Get Help Now

Submit a Take Down Notice

Tutor
Tutor: Dr Jack
Most rated tutor on our site