标签:oid ima 技术 include mic for wap amp i++
#include<stdio.h>
void swap(int *a,int *b){
int term=*a;
*a=*b;
*b= term;
}
int main(){
int i,j;
int a[10];
for(i=0;i<10;i++){
scanf("%d",&a[i]);
}
for(i=0;i<10;i++){
for (j=0;j<9-i;j++){
if(a[j]>a[j+1]){
swap(&a[j],&a[j+1]);
}
}
}
for (i=0;i<10;i++){
printf("%d ",a[i]);
}
printf("\n");
return 0;
}
标签:oid ima 技术 include mic for wap amp i++
原文地址:https://www.cnblogs.com/p201821440034/p/10894101.html