求最小值,稍微改一下就行了。int max(int* a, int n) { int t; if (n == 0) return 0; t=max(a, n - 1); if (a[n - 1] > a[t]) return n - 1; return t;}