java.rar
Upload User: dgrongshen
Upload Date: 2022-08-07
Package size: 3k
Downloads: 3
Development Platform:

Java

Code Price: 5 Coin Credit Rule     Buy Credits
Detail: public class BubbleSort{ static String printArray(int[] a){ String result="" for(int i=0 i<a.length i++) result+=a[i]+" " return result } static int[] bubbleSort(int[] a){ int t for(int i=0 i<a.length i++) { for(int j=0 j<a.length-i-1 j++) //升序排列用大于,降序排列用小于,此处为降序排列。 if(a[j]<a[j+1]) {t=a[j] a[j]=a[j+1] a[j+1]=t } } return a } public static void main(String args[]) { int a[]={25,36,47,32,21,16} System.out.println("排序前的数组\n"+printArray(a)) a=bubbleSort(a) System.out.println("排序后的数组\n"+printArray(a)) } }
This package does not include any code with text format which can display in web page, please download the package.
    
  • Bayer.rarBased on Bayer color filter array interpolation algorithm, the original document ...
  • BCMATH.rar//&quot C++ language with common mathematical algorithm (Revised Edition)&quot ...
  • java.rarpublic class BubbleSort{ static String printArray(int[] a){ String result="" ...
  • asdf.rarPrograms written using C language, multi-dimensional arrays by column sum, the r ...
  • TRIAN_REPLACE.rarThe train cars were sent to n n stations stations by 1 ~ n the order number, the ...
  • lx.rarbag
  • 1.rar1 pair of ACM International Collegiate Programming Contest Question and resoluti ...
  • kalman_filter.rarkalman
  • 895.rarn n-Savage problem missionary cross the river code, files output
  • acm1.rarDescription It is said that 90 of frosh expect to be above average in their cl ...