uses crt;
var n,i,tam,j:longint;
a:array[1..100]of longint;
begin
clrscr;
write('n='); readln(n);
for i:=1 to n do
begin
write('a[',i,']='); readln(a[i]);
end;
{-----------------------------xu-ly---------------------------}
for i:=1 to n-1 do
for j:=i+1 to n do
if a[i]>a[j] then
begin
tam:=a[i];
a[i]:=a[j];
a[j]:=tam;
end;
writeln('day tang dan la: ');
for i:=1 to n do
write(a[i]:4);
readln;
end.