int main(){ int a[10],i,j,k; for (i=0;i<10;i++){ scanf("%d",a[i]); } for (i=0;i<10;i++){ printf("a[%d]=%d",i,a[i]); } for (i=0;i<10;i++){ for (j=0;j<10-i;j++){ if (a[j]>a[j+1]){ k=a[j]; a[j]=a[j+1]; a[j+1]=k; } } } for (i=0;i<10;i++){ printf("a[%d]=%d",i,a[i]); }
}