Algorithme (partiel) de l'inversion d'un tableau
Variables en entrée:
    int taille=10;
    int tab[taille]={1,3,5,7,11,13,17,19,23,29};
    int nbEffectif = 10;

Variables auxiliaires:
     int elem;
     int ind1=0;
     int ind2=nbEffectif-1;

Corps de l'algorithme détaillé:

while (ind1<nbEffectif/2)
    {

     elem=tab[ind2];
     tab[ind2]=tab[ind1];
     tab[ind1]=elem;
     ind1=ind1+1;
     ind2=ind2-1;     
     }
for (ind1=0; ind1<nbEffectif; i++)
     afficher(" ", tab[ind1]);
/* afficher les éléments  du tableau */

Exercices :
suivant     plan