1 ЗАДАЧА:
var
count,i: integer;
A: array [1..30] of integer;
begin
for i:=1 to 30 do
begin
A[i]:= -100 + random(206);
writeln('A[',i,'] = ', A[i]);
end;
for i:=1 to 30 do
if(A[i] mod 2 = 0) then inc(count);
Writeln;Writeln;
Writeln('Кол-во четных элементов: ', count);
end.
2 ЗАДАЧА:
const
N = 30;
var
count,i: integer;
A: array [1..N] of integer;
begin
for i:=1 to N do
begin
A[i]:= -15 + random(22);
writeln('A[',i,'] = ', A[i]);
end;
for i:=1 to 30 do
if(A[i] mod 3 = 0) then A[i]:=-A[i];
Writeln;Writeln;
for i:=1 to N do
writeln('A[',i,'] = ', A[i]);
end.