From 36c0d7d7b81210be0584116550046ccaa048e201 Mon Sep 17 00:00:00 2001 From: jabbar Date: Wed, 24 Sep 2025 10:41:29 +0200 Subject: [PATCH] =?UTF-8?q?Ajout=20des=20fichiers=20des=20s=C3=A9ances=20p?= =?UTF-8?q?r=C3=A9c=C3=A9dentes?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- DEV1.1/TP08/exo1.c | 23 +++++++++++++++++++++++ 1 file changed, 23 insertions(+) create mode 100644 DEV1.1/TP08/exo1.c diff --git a/DEV1.1/TP08/exo1.c b/DEV1.1/TP08/exo1.c new file mode 100644 index 0000000..3bdc88f --- /dev/null +++ b/DEV1.1/TP08/exo1.c @@ -0,0 +1,23 @@ +#include +#include +#include + + +int main(void) { + int n,i; + srand(time(NULL)); + while(n = 0) { + while ( n <= 100) + rand(); + printf("devinez un nombre"); + i=scanf("%d\n", &i); + + if (i < n) { + printf("moins"); + } else { + printf("plus"); + } if (n == i) { + printf("correct"); + } + } +} \ No newline at end of file