Question 1 of 10
A fireworks booth uses this method to scale a spark count. What value does product(4) return?
public static int product(int n)
{
if (n <= 1)
{
return 1;
}
return n * product(n - 1);
}
- A. 4
- B. 10
- C. 24
- D. 1