var array 100 of integer sum integer begin writeln Vvedite kolichestvo

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
var
a: array [1..100] of integer;
n, i, j, sum :integer;
begin
writeln('Vvedite kolichestvo izmerenii> ');
readln(n);
for i := 1 to n do begin
readln(a[i]);
end;
max: = a[1] + a[8];
for i := 1 to n do begin
for j := i to n do begin
if ((j - i >= 7) and (a[i] + a[j] > max)) then begin
max := a[i] + a[j];
end;
end;
end;
writeln(max);
readln;
end.