Program ABC;
uses crt;
var
a:array[1..16] of integer;
k,i,n:integer;
begin
randomize;
for i:=1 to 16 do
a[i]:=random(41)-20;
write(a[i],' ');
end;
writeln;
for i:=1 to 16 do begin if (a[i] mod 2=0) and (a[i]<>0) then write(i,' '); if a[i]<0 then k:=k+1 end;
end.
var a := ArrRandom(16, -20, 20); a.Println;
a.Numerate(0).Where(x -> x[1].isEven)
.Select(x -> x[0]).Println;
Program ABC;
uses crt;
var
a:array[1..16] of integer;
k,i,n:integer;
begin
randomize;
for i:=1 to 16 do
begin
a[i]:=random(41)-20;
write(a[i],' ');
end;
writeln;
for i:=1 to 16 do begin if (a[i] mod 2=0) and (a[i]<>0) then write(i,' '); if a[i]<0 then k:=k+1 end;
writeln;
end.
begin
var a := ArrRandom(16, -20, 20); a.Println;
a.Numerate(0).Where(x -> x[1].isEven)
.Select(x -> x[0]).Println;
end.