Ответ: const    n = 40;var    sum, k, i: integer;    a: array[1..n] of integer;begin    randomize;        writeln(‘Исходный массив:’);    for i := 1 to n do     begin        a[i] := random(1000) — 500;        write(a[i], ‘ ‘);                if (a[i] <= -10) and (a[i] >= -99) then        begin            k := k + 1;            sum := sum + a[i];        end;    end;    writeln;        writeln(sum / k);end.