Write a definition of the factorial function using a for-loop to accumulate the factorial. Make the argument and the result both have type long. Call the function factorial.

 

    [Language: Java  Kind: function definition]