const n = 15;
var
a: array[1..n] of integer;
i, x: integer;
begin
for i := 1 to n do begin
a[i] := random(50);
write(a[i], ' ');
x := x + a[i];
end;
writeln;
writeln('a[1] + a[7] = ', a[1] + a[7]);
writeln('a[9] - a[3] = ', a[9] - a[3]);
writeln('Среднее арифметическое: ', (x / n):0:2);
end.