function factorial ($number
{
$factorial = 1;
while$number > 1)
{
$factorial *= $number
$number--;
}
return $factorial
}
eXorithm – Execute Algorithm: View / Run Algorithm factorial

function factorial ($number
{
$factorial = 1;
while$number > 1)
{
$factorial *= $number
$number--;
}
return $factorial
}