Var i,count:integer; mas: array [1..10] of integer; begin randomize; for i:=1 to 10 do begin mas[i]:=random(-30,30); write(mas[i], ' '); end; writeln(''); writeln('Номера четных элементов'); count:=0; for i:=1 to 10 do begin if mas[i] mod 2 = 0 then begin write(i,' '); count:=count+1; end; end; writeln(''); writeln('Количество четных элементов = ', count); end.
i,count:integer;
mas: array [1..10] of integer;
begin
randomize;
for i:=1 to 10 do begin
mas[i]:=random(-30,30);
write(mas[i], ' ');
end;
writeln('');
writeln('Номера четных элементов');
count:=0;
for i:=1 to 10 do begin
if mas[i] mod 2 = 0 then begin
write(i,' ');
count:=count+1;
end;
end;
writeln('');
writeln('Количество четных элементов = ', count);
end.