uses crt;
var a:array[1..100]of integer;
i,n,max,tam,j:integer;
begin
clrscr;
n:=100;
for i:=1 to n do
begin
write('A[',i,']='); readln(a[i]);
end;
max:=a[1];
for i:=1 to n do
if max<a[i] then max:=a[i];
writeln('Gia tri lon nhat la: ',max);
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 so giam dan la: ');
for i:=1 to n do
write(a[i]:4);
readln;
end.