uses crt;
var a: array[1..100] of integer;
i,j,n,t,x,p,q:integer;
begin
clrscr;
write ('nhap n: '); readln (n);
for i:=1 to n do
begin
write ('nhap phan tu thu ',i,': '); readln(a[i]);
end;
for i:=1 to n-1 do
for j:=1 to n-i do
if a[j]>a[j+1] then
begin
t:=a[j];
a[j]:=a[j+1];
a[j+1]:=t;
end;
write ('day sau khi sap xep tang dan la: ');
for i:=1 to n do write(a[i],' ');
readln;
End.