Loading [MathJax]/jax/output/HTML-CSS/fonts/TeX/fontdata.js

F-6 The factorial function

Write a function that accepts a single number as parameter and returns it's factorial number. Factorial number is the product of all multiplications from number to 1 to the number itself.

For example. Factorial of 5 = 1 * 2 * 3 * 4 * 5 = 120

factorial of 4 = 1 * 2 * 3 * 4 = 24 etc.