public static void main(String[] args) {
        int [] a = new int[]{5,2,61,3,76,8,1};
        for(int i = 0;i<a.length;i++){
            for(int j = 0 ; j<a.length-i-1;j++){
                if(a[j]>a[j+1]){
                    int tmp  = a[j];
                    a[j]=a[j+1];
                    a[j+1]=tmp;
                }
            }
        }
        for(int i = 0;i<a.length;i++){
            System.out.println(a[i]);
        }
}