const
max=11;
var
a:array[1..max] of integer;
sump,sumo,i:integer;
begin
sump:=0;
sumo:=0;
writeln('Формирование массива:');
for i:=1 to max do
begin
a[i]:=random(8)-4;
if a[i]>0 then
inc(sump,a[i]);
if a[i]<0 then
inc(sumo,a[i]);
write(a[i],' ')
end;
writeln;
writeln('Сумма положительных элементов: ',sump);
writeln('Сумма отрицальных элементов: ',sumo)
end.