You are given a two-dimensional array 10×10, containing numbers in the range from -10 to 10.

You are given a two-dimensional array 10×10, containing numbers in the range from -10 to 10. Calculate separately the sum of positive and the sum of negative elements.

// PascalABC.NET 3.2, build 1325 from 10/19/2016
begin
var a: = MatrixRandom (10,10, -10,10);
var sp: = 0; var sn: = 0;
for var i: = 0 to 9 do begin
for var j: = 0 to 9 do begin
Write (a [i, j]: 4);
if a [i, j]> 0 then Inc (sp)
else
if a [i, j] <0 then Inc (sn)
end;
Writeln
end;
Writeln (‘Positive’, sp, ‘, negative’, sn)
end.



One of the components of a person's success in our time is receiving modern high-quality education, mastering the knowledge, skills and abilities necessary for life in society. A person today needs to study almost all his life, mastering everything new and new, acquiring the necessary professional qualities.