Program z1;
Var a: array [1..100] of integer; i,s,j,m,n:integer;
b: array [1..100] of integer;
Begin
write('Введите размерн массива - ');
readln(n);
randomize;
for i:=1 to n do
begin
a[i]:=random(20)-10;
write (a[i],' ');
end;
j:=1;
for i:=1 to n do
if (a[i]>0)
then begin
b[j]:=a[i];
j:=j+1;
end;
writeln;
s:=0;
m:=j-1;
for j:=1 to m do
write (b[j],' ');
for j:=1 to m do
if (j mod 2 = 0) then s:=s+b[j];
writeln;
writeln(s);
End.