Hi,
I need to produce a math job like:
x=n!/6!(n-6)!
that formula contain factorial symbol (!). It's possible to make a factorial function to produce factorial or is there a php function just usefull ?
Thanks
Carlo
Factorial function
Moderator: General Moderators
You probably can make a function yourself...
Code: Select all
<?php
$answer = 1;
$number = 6;
for($i = 1; $i <= $number; $i++) {
$answer *= $i;
}
?>