What is the value returned when the integer 3 is the argument to the factorial method?
The following code for the method factorial() applies to the next two questions:
```
public static double factorial (double n)
{
if (n == 0)
{
return 1;
}
else
{
return n * factorial(n-1);
}
}
```
(a) 2
(b) 4
(c) 6
(d) 8
(c) 6
You might also like to view...
Use a sequence diagram to describe the interactions among the participating processes.
Consider the Simple Mail Transfer Protocol (SMTP)4.An excerpt from the RFC for this protocol provides the following sample session.
```
R: 220 USC-ISI.ARPA Simple Mail Transfer Service Ready
S: HELO LBL-UNIX.ARPA
R: 250 USC-ISI.ARPA
S: MAIL FROM:
Big O notation is concerned with the growth rate of algorithm run times, so ________.
a. constants are dominant b. constants are ignored c. constant terms are emphasized d. constants with large values are more important than those with low values