diff --git a/factoriel_tableau.php b/factoriel_tableau.php new file mode 100755 index 0000000000000000000000000000000000000000..4a718fc9957d2113f9e09507979fbe605e9123cc --- /dev/null +++ b/factoriel_tableau.php @@ -0,0 +1,32 @@ +<html> + <head> + <title>M2GPI</title> + </head> + <body> + <table> + <thead> + <tr> + <th>Factoriel</th> + <th>Résultat</th> + <th>Type</th> + </tr> + </thead> + <tbody> + <?php + for ($i=0; $i < 100; $i++) { + $f = 1; + for ($n=$i; $n > 0; $n--) { + $f = $f * $n; + } + echo " + <tr> + <td>" . $i . "</td> + <td>" . $f . "</td> + <td>" . gettype($f) . "</td> + </tr>"; + } + ?> + </tbody> + </table> + </body> +</html>