var a: array[1..20] of integer;s,i: integer;begin
s := 0; for i := 1 to 20 do begin a[i] := random(40)-20; if a[i] >0 thens := s+a[i]; write(a[i]:4); end; writeln; writeln(s);end.
var
a: array[1..20] of integer;
s,i: integer;
begin
s := 0;
for i := 1 to 20 do
begin
a[i] := random(40)-20;
if a[i] >0 then
s := s+a[i];
write(a[i]:4);
end;
writeln;
writeln(s);
end.