Need help C++ if and else

closed account (Doj23TCk)
How would you write this as an if and else statement?

#include <stdio.h>
void swap(int *a, int *b, int *c)
{
int max,min,mid;
max = *a>*b ? *a:*b;
max = max>*c ? max:*c;

min = *a<*b ? *a:*b;
min = min<*c ? min:*c;

mid = *a + *b + *c - max - min;
*c = max;
*b = mid;
*a = min;
}
So this is the 4th topic about this same subject .
Topic archived. No new replies allowed.