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

Computer Science & Information Technology

You might also like to view...

Multifactor authentication is when a user can log in once and gain access to multiple systems

Indicate whether the statement is true or false

Computer Science & Information Technology

What is nested virtualization?

What will be an ideal response?

Computer Science & Information Technology