#include <stdio.h>
int main()
{
int a, b, c;
printf("Enter three numbers : ");
scanf("%d %d %d", &a, &b, &c);
if (a > b && a > c) /// 99 5 6 || 99 6 5
{
if (b > c)
{
printf("The maximum number is %d\n", a);
printf("The minimum number is %d", c);
}
else
{
printf("The maximum number is %d\n", a);
printf("The minimum number is %d", b);
}
}
else if (b > a && b > c) /// 9 55 6 || 6 55 9
{
if (a > c) ///
{
printf("The maximum number is %d\n", b);
printf("The minimum number is %d", c);
}
else
{
printf("The maximum number is %d\n", b);
printf("The minimum number is %d", a);
}
}
else if (c > b && c > a)
{
if (b > a)
{
printf("The maximum number is %d\n", c);
printf("The minimum number is %d", a);
}
else
{
printf("The maximum number is %d\n", c);
printf("The minimum number is %d", b);
}
}
return 0;
}