用C语言实现单纯形法求最优解void paixu(p,n) int n; double p[]; { int m,k,j,i; double d; k=0; m=n-1; while (k p[i+1]) { d=p; p=p[i+1]; p[i+1]=d; m=i;} j=k+1; k=0; for (i=m; i>=j; i--) if (p[i-1]>p) { d=p; p=p[i-1]; p[i-1]=d; k=i;} } return; }