The factorial of a non-negative integer n (denoted as n!) is the product of all positive integers less than or equal to n. For example: 5! = 5 * 4 * 3 * 2 * 1 = 120 By definition, 0! = 1.
Write a MATLAB function that calculates the factorial of a given number n.
Solution Stats
Solution Comments
Show comments
Loading...
Problem Recent Solvers4
Suggested Problems
-
4 Solvers
More from this Author30
Problem Tags
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!