#include
#include
Void the Quick (long num [], int low, int high) {//Quick sort
Long pivotkey;
Int l, h;
L=low;
H=high;
Pivotkey num=[low];//use the first element as the hub
While (l
While (num [l] <=pivotkey& & H> L) l++;//from right to left to find a bigger than pivotkey element
Num=[h] num [l];
}
Num=[l] pivotkey;
If (low!=l)
The Quick (num, low, l - 1);//recursive sequence of the remaining quick sort
If (high!=l)
The Quick (num, m + 1, high);
}
Int main () {
Long * num;
int n;
Printf (" input array length: \ n ");
The scanf (" % d ", & amp; N);
Num=(long *) malloc sizeof (n * (long));
int i=0;
For (I; i
Printf (" at the end of array is generated, \ n \ n \ n ");
Int flag=1;
While (flag) {
The Quick (num. Zero, n - 1);
flag=0;
Sequence printf (" \ n ");
Printf (" continue to sort please enter 1 \ n ");
The scanf (" % d ", & amp; The flag);
If (flag!
=1)flag=0;
}
return 0;
}