1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51
|
#include <stdio.h>
#include <stdlib.h>
int main()
{
int a = 0,b = 0,c = 0;
printf("entrer la valeur de a \n");
scanf("%d",&a);
printf("entrer la valeur de b \n");
scanf("%d",&b);
printf("entrer la valeur de c \n");
scanf("%d",&c);
if (a<b && b<c)
{
printf("a est plus petit, c est plus grand \n");
}
else if (a>b && b>c)
{
printf("c est plus petit, a est plus grand \n");
}
else if (a<b && b>c && c<a)
{
printf("b est plus grand; a est plus petit \n");
}
else if (a<b && b<c && c>a)
{
printf("b est plus grand; c est plus petit \n");
}
else if (a>b && b<c && c>a)
{
printf("a est plus grand; b est plus petit \n");
}
else
{
printf("erreur");
}
system("pause");
return 0;
} |
Partager