#include <stdio.h> int max(int a, int b, int c) { return (a > b && a > c) ? a : (b > c ? b : c); } int min(int a, int b, int c) { return (a < b && a < c) ? a : (b < c ? b : c); } int mid(int a, int b, int c) { if (a != max(a, b, c) && a !...