# # Compute n-factorial for a value of n read from the user. # # # Read the value of n from the user. # n = int(input("Enter a non-negative integer: ")) original_n = n # # Initialize result. # result = 1 # # While n is greater than 0... # while n > 0: # # Multiply the result so far by the current value of n. # result = result * n # # Decrease the value of n # n = n - 1 # # Display the result. # print(f"{original_n} factorial is equal to {result}.")