const n=15;
var a:array [1..n] of integer;
i,k:integer;
begin
write('Массив: ');
for i:=1 to n do
a[i]:=random(22)-3;
write(a[i],' ')
end;
writeln;
write ('Четные элементы: ');
if a[i] mod 2 = 0 then write(a[i],' ')
end.
const n=15;
var a:array [1..n] of integer;
i,k:integer;
begin
write('Массив: ');
for i:=1 to n do
begin
a[i]:=random(22)-3;
write(a[i],' ')
end;
writeln;
write ('Четные элементы: ');
for i:=1 to n do
if a[i] mod 2 = 0 then write(a[i],' ')
end.