#include <stdio.h>#include <stdlib.h>#include <math.h>int T[10]={5,2,9,7,1,6,12,51,24,18};int partitionner(int *T, int premier, int dernier) { int pivot = T[premier], i = premier-1, j = dernier+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 premier, int dernier){ int pivot; if(premier < dernier) { pivot = partitionner(T,premier, dernier); tri_rapide(T, premier, pivot-1); tri_rapide(T, pivot+1, dernier); }}int main(){ tri_rapide(T,0,9); for (int i=0 ; i< 10 ; i++) printf("%d ",T[i]); return 0;}