fun(double *min, double *mid, double *max) { if (*mid < *min) { swap(mid, min); } if (*max < *min) { swap(max, min); } if (*max < *mid) { swap(max, mid); } } swap(double *p1, double *p2) { double tmp = *p1; *p1 = *p2; *p2 = tmp; }
[此贴子已经被作者于2016-7-29 21:45编辑过]