Var
a: array[1..100] of integer;
i, n: integer;
begin
{ввод массива}
n := 15;
writeln('Данные массива:');
for i := 1 to n do
begin
a[i] := random(40 + 40) - 40;
write(a[i], ' ');
end;
writeln();
{изменение элементов}
for i := 1 to n do
begin
if a[i] mod 5 = 0 then
a[i] := 2 * a[i]
else a[i] := a[i] - 2;
write(a[i], ' ');
end;
end.