uses crt;
const N=10;
var a:array [1..N] of integer;
x,min,max,sum:integer;
begin
randomize;
for x:=1 to N do
begin
a[x]:=random(21)+5;
writeln('a[',x,']:',a[x]:3);
end;
min:=a[1];
max:=a[1];
for x:=1 to N do
begin
if a[x] if a[x]>max then max:=a[x];
end;
sum:=min+max;
writeln;
write('max:',max,'; min:',min,'; max+min=',sum);
end.