Write a recursive assembly subroutine that calculates the following Fibonnaci number: 𝑓(𝑛) = { 0 1 w
Posted: Fri Apr 29, 2022 8:03 am
Write a recursive assembly subroutine that calculates the
following Fibonnaci number: ๐(๐) = { 0 1 ๐(๐ โ 1) + ๐(๐ โ 2) ๐๐ ๐ =
0 ๐๐ ๐ = 1 ๐๐กโ๐๐๐ค๐๐ ๐ Please test the subroutine by passing the
value of n equals 6. The result should equal 8. If n equals 4, the
result is 3. Do you use local variables, how do you manage them?
How do you pass the parameter n to the subroutine and how does the
subroutine return the result?
following Fibonnaci number: ๐(๐) = { 0 1 ๐(๐ โ 1) + ๐(๐ โ 2) ๐๐ ๐ =
0 ๐๐ ๐ = 1 ๐๐กโ๐๐๐ค๐๐ ๐ Please test the subroutine by passing the
value of n equals 6. The result should equal 8. If n equals 4, the
result is 3. Do you use local variables, how do you manage them?
How do you pass the parameter n to the subroutine and how does the
subroutine return the result?