Var
a:array[1..6]of integer;
i,j,max:integer;
function mx(a,b:integer):integer;
begin
if a>b then result:=a else result:=b;
end;
begin
for i:=1 to 6 do
begin
a[i]:=random(20);
write(a[i]:4);
end;
writeln;
max:=a[1];
for i:=1 to 6 do
for j:=i+1 to 6 do
if mx(a[i],a[j])>max then max:=mx(a[i],a[j]);
writeln('max=',max);
end.