DEV1-21-22/Exemples/main.c

30 lines
514 B
C
Raw Permalink Normal View History

2021-09-28 10:28:35 +02:00
/*
*/
2021-09-28 09:15:52 +02:00
#include <stdio.h>
#include <stdlib.h>
int main (int argc, char *argv[])
{
2021-09-28 10:18:55 +02:00
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);
2021-09-28 09:15:52 +02:00
return EXIT_SUCCESS;
}