0
I have tried, tried and nothing. A program that multiplies a number typed by someone in descending order.
For example:
typed 7
and I gave OK: 7x6x5x4x3x2x1
should be the result of all this.
Code I already have:
<?php
$n = $_GET['num'];
$n2 = $n1;
$tot = 0;
while($n >= 1){
$n2 = $n2 - 1;
$tot = $n2 * $n2;
$n--;
echo "$tot <br>";
}
?>
@Jeffersonjunior what you want to do exactly?
– gato
Do not print the code but make it difficult for those who answer, use the option
{ }
to format your code. Take advantage and see how to ask.– gato
He wants to calculate the factorial of an integer number... that’s all.
– user75204
Related: Best factor calculation algorithm and Make PHP print the result of the Factorial class
– rray