top of page
Click here to go to the home page of AskTheCode.

Calculate the factorial of a number

Team ATC

Asked: Anonymously |Category: Python

 

n=eval(input("Enter the number"))

temp=n

fac=1

while temp>0:

fac*=temp

temp-=1

print('factorial of',n,'is',fac)


 
 
 

Recent Posts

See All

Komentar


bottom of page