factorial

mail@pastecode.io avatar
unknown
plain_text
a year ago
219 B
1
Indexable
Never
n=int(input("n="))
factorial=1

if n==0:
        print("factorial = 1")
elif n>0:
        for i in range (1,n+1):
            factorial*=i
        print(factorial)
else:
        print("do not exist factorial")