题一 数组排序 奇数在前 偶数在后
public static void main (String [] args ){ int a [] = {1,2,4,3,6,7,9}; int start =0; int temp; int end = a.length-1; while(start!=end){ if((a[start]%2==0)&&(a[end]%2!=0)){ temp = a[start]; a[start]=a[end]; a[end]=temp; end--; } start++; } for(int i=0;i<a.length;i++){ System.out.println(a[i]); } }