银行atm机生产厂家:什么是C语言的起泡法
来源:百度文库 编辑:查人人中国名人网 时间:2024/05/09 04:55:35
int a[10]={……};
int temp;
for(int i=0;i<10;i++)
for(int j=i;j<10;j++)
{if(a[i]>a[j])
{temp=a[i];temp=a[j];a[i]=a[j];}
}
//从小到大排序;
for example:
2,4,1,91,15
first: 2,1,4,15,91
second: 1,2,4,15,91
ok