for(j=1;j<n-1;j++)
{
for(i=0;i<n-j;i++)
{
if(a[i]>a[i+1])
{
int t;
t=a[i];
a[i]=a[i+1];
a[i+1]=t;
}
}
}
起泡法对n个数由小到大排序
于 2022-12-08 11:49:44 首次发布