From d3c78f618ec23022a22beb69ba0bdc52919207cc Mon Sep 17 00:00:00 2001
From: KAPIAS NICOLAS <nicolas.kapias@etu.unistra.fr>
Date: Mon, 13 Jan 2025 10:17:09 +0100
Subject: [PATCH] exercice 2 13/01/2025

---
 factoriel_tableau.php | 32 ++++++++++++++++++++++++++++++++
 1 file changed, 32 insertions(+)
 create mode 100755 factoriel_tableau.php

diff --git a/factoriel_tableau.php b/factoriel_tableau.php
new file mode 100755
index 0000000..4a718fc
--- /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>
-- 
GitLab