Const n = 10; var mas:array[1..n] of integer; i, pr, ch:integer; begin pr:= 1; randomize; write('Массив: '); for i := 1 to 10 do begin mas[i]:=random(20)-10; write(' ',mas[i]); if (mas[i] mod 2)= 0 then ch:=ch+1; if (mas[i] mod 5)= 0 then pr:=pr * mas[i]; end; writeln(); writeln('Четных: ', ch); writeln('Произведение кратных 5: ', pr); end.
var
mas:array[1..n] of integer;
i, pr, ch:integer;
begin
pr:= 1;
randomize;
write('Массив: ');
for i := 1 to 10 do begin
mas[i]:=random(20)-10;
write(' ',mas[i]);
if (mas[i] mod 2)= 0 then
ch:=ch+1;
if (mas[i] mod 5)= 0 then
pr:=pr * mas[i];
end;
writeln();
writeln('Четных: ', ch);
writeln('Произведение кратных 5: ', pr);
end.