void trirapide(float *tab,int g, int d) { int i,de; if (g>=d) return; swap(tab,g,(g+d)/2); de=g; for (i=g+1;i<=d;i++) if (tab[i]<tab[g]) swap(tab,++de,i); swap(tab,g,de); trirapide(tab,g,de-1); trirapide(tab,de+1,d); }
// MAIN int main() { int a,b; TABLEAU jean; /*printf("%lu \n", sizeof(TABLEAU));*/ srand(time(NULL)); jean= init_tab(jean); affiche_tab(jean); a = multi( jean); b = min(jean); printf("produit : %d, min : %d \n ", a,b); jean = decalage(jean); affiche_tab(jean); printf("\n"); jean = trirapide(jean, 0, jean.taille); affiche_tab(jean); return 0; }