#include #include #include int T[10]={5,2,9,7,1,6,12,51,24,18};int partition(int *T, int prime, int last) { int pivot = T[first], i = prime-1, j = last+1; int temp; while (true) { do j--; while (T[j] > pivot); do i++; while (T[i] < pivot); if (i < j) { temp = T[i]; T[i] = T[j]; T[j] = temp; } else return j; }}void tri_rapide(int T[], int first, int last){ int pivot; if(最初<最後) { pivot = partition(T,最初, 最後); tri_rapide(T, first, pivot-1); tri_rapide(T, pivot+1, last); }}int main(){ tri_rapide(T,0,9); for (int i=0 ; i< 10 ; i++) printf("%d ",T[i]); 0を返します。}