From 75667de20529d4db73717a4b31081f36672e4323 Mon Sep 17 00:00:00 2001 From: Pierre Valarcher Date: Tue, 28 Sep 2021 10:18:55 +0200 Subject: [PATCH] exe1 --- Exemples/main.c | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) diff --git a/Exemples/main.c b/Exemples/main.c index 5bf93a9..53c4a5a 100644 --- a/Exemples/main.c +++ b/Exemples/main.c @@ -3,6 +3,23 @@ int main (int argc, char *argv[]) { + int a, b, c; + + printf("Entrer un premier entier : "); + scanf("%d", &a); + printf("Entrer un deuxieme entier : "); + scanf("%d", &b); + printf("Entrer un troisieme entier : "); + scanf("%d", &c); + + printf("Entiers lus : %d, %d, %d\n", a, b, c); + + if ((a >= b) && (a >= c)) + printf("Max = %d\n", a); + if ((b >= a) && (b >= c)) + printf("Max = %d\n", b); + if ((c >= a) && (c >= b)) + printf("Max = %d\n", c); return EXIT_SUCCESS;