var a:array[1..10]of integer;
min,max,i:integer;
begin
for i:=1 to 10 do a[i]:=random(11);
for i:=1 to 10 do write(a[i],' ');
writeln;
min:=a[1];
max:=a[1];
for i:=2 to 10 do begin
if a[i]<min then min:=a[i];
if a[i]>max then max:=a[i];
end;
writeln(max+min);
end.
var a:array[1..10]of integer;
min,max,i:integer;
begin
for i:=1 to 10 do a[i]:=random(11);
for i:=1 to 10 do write(a[i],' ');
writeln;
min:=a[1];
max:=a[1];
for i:=2 to 10 do begin
if a[i]<min then min:=a[i];
if a[i]>max then max:=a[i];
end;
writeln(max+min);
end.