public class M{ 

int[] array = {2,3,6.5.89.4.1.6};

  int b = array.length;

  int temp = 0;

     for(int i=0;i<b;i++){

        for(int j=i+1;j<b;j++){

           if(array[i]>array[j]){

               temp = a[i];

               a[j] = a[i];

               a[j] = temp;

   }

 }

}

 System.out.print("array元素的降序排序:");

 for(int i=0;i<b;i++);

 System.out.println(array[i]+"");

}

相关文章:

  • 2022-12-23
  • 2021-07-13
  • 2022-12-23
  • 2022-01-23
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
猜你喜欢
  • 2021-09-19
  • 2022-12-23
  • 2021-07-09
  • 2021-07-15
  • 2022-12-23
  • 2022-12-23
  • 2021-07-04
相关资源
相似解决方案