Question: procedure factorial(n: nonnegative integer) if n=0 then return 1 else return n*factorial(n-1) What is the output of this algorithm when the input is 3?
procedure factorial(n: nonnegative integer) if n=0 then return 1 else return n*factorial(n-1)
What is the output of this algorithm when the input is 3?
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
