Fact Function | |
Calculate the factorial of a number.
Namespace:
XSharp.RT
Assembly:
XSharp.RT (in XSharp.RT.dll) Version: 2.19
Syntax Remarks
The factorial of an integer n is computed as follows:
1Factorial(n)=n*(n-1)*(n-2) ... 3*2*1
The factorial of 0 is defined to be 1.
Examples
This example uses Fact() to compute the factorial of 5, then it verifies the result:
1? Fact(5)
2
3? 5*4*3*2*1
See Also