Var i, s: integer; a: array [1..40] of integer; begin for i := 1 to 40 do begin a[i] := random(20); writeln('[', i, '] => ', a[i]); s := s + a[i]; end; writeln(s); end.