Q:

What does this function do:

0

function outvar = mystery(x,y)

if y == 1

 outvar = x;

else

 outvar = x + mystery(x,y-1);

end

Give one word to describe what this function does with its two 

arguments

All Answers

need an explanation for this answer? contact us directly to get an explanation for this answer

Multiplies! The Fibonacci numbers is a sequence of numbers 0, 1, 1, 2, 3, 5, 8, 13, 21, 34... The sequence starts with 0 and 1. All other Fibonacci numbers are obtained by adding the previous two Fibonacci numbers. The higher up in the sequence that you go, the closer the fraction of one Fibonacci number divided by the previous is to the golden ratio. The Fibonacci numbers can be seen in an astonishing number of examples in nature, for example, the arrangement of petals on a sunflower.

need an explanation for this answer? contact us directly to get an explanation for this answer

total answers (1)

Similar questions


need a help?


find thousands of online teachers now