>>718
#include <stdlib.h>

static int icmp(const void *x,const void *y);

int iselect(int a,int b,int c)
{
int ia[3];
ia[0]=a,ia[1]=b,ia[2]=c;
qsort(ia,3,sizeof(int),icmp);
return ia[1];
}

static int icmp(const void *x,const void *y)
{
const int *xp=x;
const int *yp=y;

return *xp==*yp?0:*xp<*yp?-1:1;
}