var s:array[1..10] of integer;
i,r,sum:integer;
begin
for i:= 1 to 10 do
r := random(40)-10;
s[i] := r;write(i:4,s[i]:5);
sum:= sum + s[i];
writeln;
end;
writeln('sum = ', sum);
end.
var s:array[1..10] of integer;
i,r,sum:integer;
begin
for i:= 1 to 10 do
begin
r := random(40)-10;
s[i] := r;write(i:4,s[i]:5);
sum:= sum + s[i];
writeln;
end;
writeln('sum = ', sum);
end.