Monday, June 29, 2020

pyhton Recursive Program for Fcatorial Calculation

def factorial(n): if n <= 1: return 1 else: return n * (factorial(n - 1)) print(factorial(5))




Flowchart: Recursion: Factorial of a non-negative integer.

No comments:

Post a Comment