#include< iostream>
using namespace std;
void quick_sort(int* num,int left,int right)
{
if(left < right)
{
int low=left;
int high=right;
int key=num[low];
while(low< high)
{
while(low< high&&num[high]>=key)
--high;
num[low]=num[high];
while(low< high&&num[low]<=key)
++low;
num[high]=num[low];
}
num[low]=key;
//遞歸
quick_sort(num,left,low-1);
quick_sort(num,low+1,right);
}
}
int main(void)
{
int num[9]={2,5,9,1,7,3,18,20,11};
quick_sort(num,0,8);
for(int i=0;i<9;++i)
return 0;
}