#include<stdio.h>
int main()
{
int i,j,arr[100],n,d;
while(scanf("%d",&n)!=EOF);
{
for(i=0;i<n;i++)
{
scanf("%d",&arr[i]);
}
for(i=1;i<n;i++)
{
for(j=0;j<n-i;j++)
{
if(arr[j+1]<arr[j])
{
int temp=arr[j];
arr[j]=arr[j+1];
arr[j+1]=temp;
}
}
}
for(i=0;i<n;i++)
{
printf("%d ",arr[i]);
}
}
}
![img](https://img-mid.csdnimg.cn/release/static/image/mid/ask/85409774743616.jpg "=600 #left")
```