You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

11 lines
174 B

<?php
function func($num)
{
if ($num==1) {
return 1;
}
return $num * func($num-1); //递归函数
}
echo func(15);
?>