`#include<stdio.h>
int arr[100000];
void BubbleSort(int *arr,int len){
int temp, i, j;
for(i = 1; i<len; i++)
for(j = 1; j<len-i; j++)
{
if(arr[j]>arr[j+1])
{
temp = arr[j+1];
arr[j+1] = arr[j];
arr[j] = temp;
}
}
}
int main(){
int i, n;
scanf("%d",&n);//输入一个大小为n的数组
for(i = 1; i<=n; i++){scanf("%d", &arr[i]);
}
BubbleSort(arr, n+1);
for(i = 1; i<=n; i++)
printf("%d ",arr[i]);
return 0;
}`