<`Д´>C/C++の宿題は私にやらせるニダ!Ver11
■ このスレッドは過去ログ倉庫に格納されています
0720デフォルトの名無しさん
NGNG#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;
}
■ このスレッドは過去ログ倉庫に格納されています