public int multiply( int n )
{
if (n == 0)
return 1;
else if (n % 2 ==1)
return n;
else
return n * multiply( n - 2);
}
a) If the method multiply(8) is called, what is the output? I got 8 as the output but I'm not sure... It's probably either 8 or 0...
b)What do you notice about the bolded text in regards to programming? What is this programming concept called? Explain this concept. Back up your explaination by writing out each step in the code.
-I know that the bolded terms are the same method. The concept is 'Recursion'. Recursion is when a method calls upon itself. But what does it mean when it asks "Back up your explaination by writing out each step in the code."??
Thanks in advance for your help!