void main()
{
int a, b;
printf("Enter a and b:");
scanf("%d %d", &a, &b);
printf("Maximum number is %d", max(a, b));
getch();
}
int max(int a, int b)
{
int c, temp;
c = a - b;
temp = c + abs(c);
// To check if the difference is negative or not
if(temp) //As suggested by R..
return b;
else
return a;
}
Этот код предназначен для сравнения двух чисел.Сделайте это сравнение для всех чисел.