Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
Cálculo de Fatorial
<?php
$n = 10;
$fatorial = 0;
for($i = 0; $i <= 10; $i++) {
if($i == 0) {
$fatorial = 1;
}
else{
$fatorial *= $i;
}
}
echo $fatorial;
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.