1) #USING FOR LoOp ππ
n=int(input("enter the number:"))
result=1
for i in range(n,0,-1):
result=result*i
print(result)
2)# using recursion ππ
def fact(n):
if n==0:
return 1
else:
return n*fact(n-1)
print(fact(5))
Top comments (0)