Using a for loop, create a function that calculates the factorial of its parameter (n! = 1 * 2 * ... * n).
for
n! = 1 * 2 * ... * n
Put an L at the end of a number literal or use .toLong() to convert an integer constant or expression to type Long.
L
.toLong()
Long