package yui;
public class W{
public static void sort(int data[], int N){
for(int i = 0;i<N-1;i++){
int max = 0;
int maxIndex = 0;
for(int j = i; j <N; j++){
if(max < data[j]) {
max = data[j];
maxIndex = j;
}
}
int tmp = data[i];
data[i] = data[maxIndex];
data[maxIndex] = tmp;
}
}
public static void main(String[] args){
int a[]={4,1,3,7,2,9,9,8,78,56,23};
sort(a,a.length);
for(int i=0;i<a.length;i++){
System.out.print(a[i]+" ");
}
}
}