Write a recursive program that computes the value of ln(n!)
Answers
Answered by
0
Program Plan:
• In the main method;
o Take an integer N
o Call ln(N) to find ln(N!) recursively and print the result.
• In ln method;
o If the given number argument is less than or equal to 0, then return 0.
o Else, return sum of ln values of integers from 1 to N.
• In the main method;
o Take an integer N
o Call ln(N) to find ln(N!) recursively and print the result.
• In ln method;
o If the given number argument is less than or equal to 0, then return 0.
o Else, return sum of ln values of integers from 1 to N.
Similar questions