to n do writeln(a[i]);\rend.\rC++çè\rSinclude <iostream>\rttinclude <ctime>\rusing namespace std;\rint partion(int a[], int p,int r)\r(\r//rand\rsrand( (unsigned)time( NULL ));\rint e=rand()% (r-p+1) +p;\rint tem;\rtem=a[e];\ra[e]=a[r];\ra[r]=tem;\rint x=a[r];\rint i=p-l;\rfor (int j=p;j<r-l;j++)\r(\rif (a[j]<=x)\r{\rtem=a[i+l];\ra[i+l]=a[j];\ra[j]=tem;\ri++ø.\rtem=a[r];\ra[r]=a[i+l];\ra[i+l]=tem;\rreturn i+1;\r)\rvoid Quicksort(int a[], int p, int r)\r(\rif (p<r)\r(\rint q=partion (a, p, r ) ;\rQuicksort (a, p, q-1);\rQuicksort (a, q+1, r ) ;\r)\r)\rint mainO\r(\rint array [] = {0, -2, 11, -4, 13, -5, 14, -43);\rQuicksort(array, 0, 7);\rfor(int i=0;i<7;i++)\rcout<<array[i]<<\rz @\rcout<<endl;\rreturn 0;