const N = 20;var a: array[1..N] of integer; i, s: integer;begin for i := 1 to N do begin a[i] := 100 + random(100); write(a[i], ' '); if(i mod 2 <> 0) then s := s + a[i]; end; writeln;writeln; writeln(s);end.
const
N = 20;
var
a: array[1..N] of integer;
i, s: integer;
begin
for i := 1 to N do begin
a[i] := 100 + random(100);
write(a[i], ' ');
if(i mod 2 <> 0) then s := s + a[i];
end;
writeln;writeln;
writeln(s);
end.