We may come across a situation, where we need to calculate a factorial of any integer. Sage X3 provides built-in function ‘fac’ to calculate the same.
Fac: It calculates a factorial of any integer value.
Syntax:
fac(integer)
To better understand this, refer the below snippet of code:
Output: