FACTORIALS

n = int(input())

i = 1
factorial = 1

while i <= n:
    # We need to multiply by i in each iteration
    factorial = i * factorial
    i = i + 1
    
print("The factorial of the given number is:", factorial)

Last updated