In the following pseudocode which uses recursion to find the factorial of a number, which is the base case?
```
Module main()
Declare Integer number
Declare Integer numFactor
Display "Enter a non-negative integer:"
Input number
Set numFactor = factor(number)
Display "The factorial of ", number, " is ", numFactor
End Module
Function Integer factor(Integer n)
If n == 0 Then
Return 1
Else
Return n * factor(n - 1)
End If
End Function
```
a. n == 0
b. n * factor(n - 1)
c. factor(n - 1)
d. Return 1
a. n == 0
You might also like to view...
An ________ is a small specialized computer built into larger components such as automobiles and appliances
A) tablet B) embedded computer C) supercomputer D) mobile device
Use the Pythagorean equation to compute the distance between the following pairs of (x, y) points below. Assume the units of the coordinate system represent feet and evaluate square roots to two decimal places when necessary.
(0, 0) and (1, 1)
Advanced filtering will not copy results to a new location
Indicate whether the statement is true or false
An unnecessary nested selection structure may still produce the correct results, but is less efficient.
Answer the following statement true (T) or false (F)