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