#include<fstream>
using namespace std;
ifstream fin("date.in");
ofstream fout("date.out");
int main()
{
int i,j,n,a[100];
fin>>n;
for(i=1;i<=n;i++) fin>>a[i];
for(i=1;i<n;i++)
for(j=i+1;j<=n;j++)
if(a[i]>a[j])
{ int aux=a[i];
a[i]=a[j];
a[j]=aux;
}
for(i=1;i<=n;i++) fout<<a[i]<<" ";
fin.close();
fout.close();
return 0;
}
|