Ok, so I need this number 3.55687428096E+14
to actually look like a proper whole number. I am not sure what to do in order to make it look like a whole number so that I can go about with my coding. Basically, without resolving this number 3.55687428096E+14
, I cant proceed properly. Below is my code, please help!
<?php
$num = 17;
$fact = $num;
echo "The factorial of $num is $num X ";
while ($num > 1){
--$num;
if ($num != 1){
echo "$num X ";
}
else{
echo "$num <b>equals</b> ";
}
$fact = $fact * $num;
}
echo $fact ."<br/>";
?>
By the way, the number 3.55687428096E+14
is the result I am getting after running the program. It comes ok till factorial 16 but once it turns to 17, things become 3.55687428096E+14!
";` – Alive to die - Anant Mar 06 '16 at 16:44