package paixu;
//插入排序从小到大
public class charu {
public static void main(String[] args) {
// TODO Auto-generated method stub
int shuzu[]={12,11,78,53,22,43,534};
int i;
int end;
int temp;
for(i=1;i<shuzu.length;i++){
end=i-1;
temp=shuzu[i];
while(end>=0&&temp<shuzu[end]){
shuzu[end+1]=shuzu[end];
end--;
}
shuzu[end+1]=temp;
}
for(int k=0;k<shuzu.length;k++){
System.out.print(shuzu[k]);
System.out.print(' ');
}
}
}