Solved

Complete the Code for the MyFactorial Recursive Method Shown Below

Question 25

Multiple Choice

Complete the code for the myFactorial recursive method shown below, which is intended to compute the factorial of the value passed to the method: public int myFactorial(int anInteger)
{
_____________________________
{
Return 1;
}
Else
{
Return(anInteger * myFactorial(anInteger - 1) ) ;
}
}


A) if (anInteger == 1)
B) if ((anInteger - 1) == 1)
C) if (anInteger * (anInteger - 1) == 1)
D) if (myFactorial(anInteger) == 1)

Correct Answer:

verifed

Verified

Unlock this answer now
Get Access to more Verified Answers free of charge

Related Questions