// ■Quick Sort(C.A.Hoare) Example #include "stdio.h" #include "stdlib.h" #include "time.h" #define DATALENGTH 10 // The number of Data #define frand()((double)rand()/(RAND_MAX+1)) // Random number(0〜1) #define swap(type,x,y) do{type t;t=x;x=y;y=t;}while(0) int Data[DATALENGTH],sortData[DATALENGTH]; void initArray(){// Genaration of Sort Data(10 〜 99) for(int i=0;i5){// Section of Pivot Data int x1 = a[pL], x2 = a[pR]; if ((x<=x1 && x1<=x2)|| (x2<=x1 && x1<=x)) x=x1; else if((x<=x2 && x2<=x1)|| (x1<=x2 && x2<=x)) x=x2; } do{ // Scan while(a[pL]x) pR--; if(pL<=pR){ swap(int, a[pL],a[pR]); pL++; pR--; } }while(pL