For this task, I made 2 codes, one was using recursion and the other one with a loop.

Here are my codes:

loop factorial

recursive factorial

For both codes I used the BigIntegerLibrary, it is complicated but the explanation is in this video:

CC BY 4.0 #WSQ09 Factorial Calculator by eduardomacielm is licensed under a Creative Commons Attribution 4.0 International License.