Essays.club - Dissertations, travaux de recherche, examens, fiches de lecture, BAC, notes de recherche et mémoires
Recherche

Algorithme.

Par   •  11 Juin 2018  •  1 546 Mots (7 Pages)  •  459 Vues

Page 1 sur 7

...

int i =-1, j =0, k = 15;

char temp;

Console.WriteLine("Les couleurs sont maintenant ordonnées :");

while (j!=k)

{

if(t[j]==’B’)

{

temp = t[j];

t[j] = t[i+1];

t[i+1] = temp;

i++;

j++;

}

else if (t[j]==’W’)

{

j++;

}

else

{

temp = t[j];

t[j]=t[k-1];

t[k-1] = temp;

k--;

}

}

}

}

static void Main(string[] args)

{

drapeauHollandais d = new drapeauHollandais(15);

d.afficher();

d.reordonne();

d.afficher();

Console.ReadLine();

}

}

}

...

Télécharger :   txt (2.6 Kb)   pdf (40.6 Kb)   docx (11.2 Kb)  
Voir 6 pages de plus »
Uniquement disponible sur Essays.club