Zurück zu Pi7.eu
BLOG
InfoBuch --- Seite 69 - Aufgabe 4
Code (Java)
public
void sort()
{
int
n = liste.length-1;
long
temp;
for
(
int
i=1; i<n; i++)
for
(
int
o=0; o<n; o++)
if
(liste[o] > liste[o+1])
{
temp = liste[o];
liste[o] = liste[o+1];
liste[o+1] = temp;
}
}
Autor:
Pierre
erstellt am 17.06.2009 15:43 - aktualisiert am 17.06.2009 15:43
245 Aufrufe
...
You can share this Blog on
Facebook
,
Google+
and
Twitter
! ... well you could