Factorial Numbers


Category:
Scripts
Ruby
Requirements:
Seller:
Price:
-
System:
Rating:
4.7
License:

Description - Factorial Numbers



This Snippet extends the integer type, giving all integers the ability to Factorial themselves. Note that I`ve included both recursive and iterative versions: while the recursive method is arguably cleaner, for larger factorials you might run into a SystemStackError: stack level too deep error in Ruby; in that case, you`ll want to use the iterative version.



More in Ruby-Factorial Numbers

Numbers Recursive Factorial Numbers Included Both Recursive