Answer:
function fibonacci(n):
if n is equal to 1 or n is equal to 2:
return 1
else:
return fibonacci(n-1) + fibonacci(n-2)
end of the function
Input the n
Print fibonacci(n)
Explanation:
* The above algorithm (pseudocode) is written considering Python.
Create a function called fibonacci that takes one parameter, n
If n is equal to 1 or 2, return 1 (When n is 1 or 2, the fibonacci numbers are 1)
Otherwise, return the sum of the two previous numbers (When n is not 1 or 2, the fibonacci number is equal to sum of the two previous numbers)
Ask the user for n
Call the function, pass n as a parameter and print the result
B. open source software...
Answer:
see explaination
Explanation:
Final value :-
Memory => value = reference in code
5000 => 12 = x
5004 => 6000 = *y
5008 => 5000 = *z
5012 => 5000 = *a
6000 => 12 = y[0]
6004 => 15 = y[1]
6008 => 10 = y[2]
6012 => 12 = y[3]
6016 => 12 = y[4]
6020 =>
<span>It depends on your intent.
If
you bought it intending to keep it, but upon using it for a few days
discovered that it was defective, didn't function as advertised, or is
not fit for purpose, no. That's a valid reason to return it and request
that the situation be made right, and you had to try using it to find
that out.
If you bought it with full knowledge that you intend to
"borrow" and return it, yes. If you only need something for a short
time, look for someone you can borrow or rent one from. Yes, that might
be a little more effort, and it might actually cost something, but it's
the right thing to do. With that practice, the store is losing money on
the "open box" item, and essentially, every other customer there is now
paying for whatever you were doing. And because of you, people with
valid reasons to return something have to fight over "restocking fees"
and the like.</span>