From ca5a6f9ec20e0cc624a5616298510657405f8520 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E2=80=9C=5BJMF=5D=E2=80=9D?= Date: Thu, 9 Nov 2023 00:20:58 +0100 Subject: [PATCH] Marche --- TP6/marche.c | 15 +++++++++++++++ 1 file changed, 15 insertions(+) create mode 100644 TP6/marche.c diff --git a/TP6/marche.c b/TP6/marche.c new file mode 100644 index 0000000..1efc291 --- /dev/null +++ b/TP6/marche.c @@ -0,0 +1,15 @@ +#include +#include + +int main() +{ + + int x = 0; + + while ( x <= 20 && x >= -20){ + + x += rand()%3 - 1 ; + printf("%d \n",x); +} + +}