PHP Compiler
<!DOCTYPE html> <html> <body> <?php $num = 6; $i = 1; $factorial = 1; for($i=1; $i<=$num; $i++) $factorial *= $i; if($num) echo "Factorial of $num: $factorial"; else echo "Factorial of 0 is 0"; ?> </body> </html>
OUTPUT
Factorial of 6: 720
×

Save as Private