From c3178433e6936680dc1b332f2fdf3871c9c891da Mon Sep 17 00:00:00 2001
From: GAUZERE Julien <julien.gauzere1@etu.univ-lorraine.fr>
Date: Thu, 3 Apr 2025 20:36:06 +0000
Subject: [PATCH] Ex3

---
 Exo.ts | 14 +++++++++++++-
 1 file changed, 13 insertions(+), 1 deletion(-)

diff --git a/Exo.ts b/Exo.ts
index 255add7..5269387 100644
--- a/Exo.ts
+++ b/Exo.ts
@@ -6,4 +6,16 @@ function deb1() {
         tab[i] = j; // Stocker j dans le tableau + point d'arret pour visualiser le remplissage du tableau (Exo2)
     }
     return j;
-}
\ No newline at end of file
+}
+
+function deb2(x: number, y: number) : void {
+    const tmp = y;
+    y = x; //Point d'arret x = 10, 9, 8, ..., 1
+    x = tmp; //Point d'arret y = 5, 6, 7, ..., 14
+    console. log(x, y);
+}
+let x = 10;
+let y = 20;
+deb2(x, y);
+console. log(x, y);
+//Le programme peut ne pas fonctionner correctement si x ou y ne sont pas initialisés correctement 
-- 
GitLab