//对六个数从小到大排序
#include<stdio.h>
int main()
{
int i,j,temp,a[6] = {1, 3, 5, 2, 4, 6};
for (i=0; i<6-1; i++)
{
for (j=i+1; j<6; j++)
{
if (a[i]>a[j])
{
temp=a[i];
a[i]=a[j];
a[j]=temp;
}
}
}
for (i=0; i<6; i++)
printf("%d ",a[i]);
return 0;
}