How to display all the numbers that are multiplied when calculating factorial?

Given an arbitrary positive integer N. Type all the decimal digits of the number N!

    1 answer 1

    Option 2:

    • Declare a battery variable equal to 1, cycle the variable i from 1 to N, and in the cycle multiply the battery by the current value of i.

    • Recursively call the function f (x), which returns x * f (x-1), while x is greater than zero.