Java Selection Sort

public class SelectionSort {
    public static void main(String[]args){
        int i,j,temp,n,k,data;
        int bil[]=new int[]{6,7,8,9,4};
        System.out.println("nilai Sebelum diurutkan");;
        for (i=0;i<bil.length;i++)
            if(bil[k] > bil[j]){
                k = j;
                temp = bil[k];
                bil[k]=bil[j];
                bil[j]=temp;
            }
    }
}

0 Response to "Java Selection Sort"

Posting Komentar