Is there a factorial function defined in a header file someplace in *nix or c/c++
I don't want to have to write this anytime i need it, kind of annoying
I mean isn't that the point of a function...
I realized that i actually needed nCm.
I actually can't recall anytime I have actually needed to compute a factorial besides class assignments.
Perhaps this is why it's not in a standard header and Bazzy's point is quite valid.
A simple factorial functions requires two lines, is it that much to write?
Nope, a simple factorial (such as, for example, 25!), takes more than 64 bits of space when represented as a number. So, even simple factorials such as 25! are not that easy to realize.
I'm talking about function implementation.
Even a + operation may give too large results. This doesn't mean that addition is not a trivial operation.
2-lines function is 2-lines function