var a:array[1..20] of real;
s,i:real;
begin
s:=0;
for i:=1 to 20 do
a[i]:=random(20);
write(a[i],' ');
read;
end;
writeln;
for i:=1 to 20 do begin
if i mod 2=0 then begin s:=s+a[i];
writeln('summa = ',s);
readln;
end.
var a:array[1..20] of real;
s,i:real;
begin
s:=0;
for i:=1 to 20 do
begin
a[i]:=random(20);
write(a[i],' ');
read;
end;
writeln;
for i:=1 to 20 do begin
if i mod 2=0 then begin s:=s+a[i];
end;
end;
writeln('summa = ',s);
readln;
end.