Write a program in Pascal to calculate the number of positive elements in the matrix B (8 * 8).

program zz1;
const n = 8;
b = 8; // set the number of elements in the array
var i, j, k: integer; // set variables of integer type
m: array [1..n, 1..b] of integer;
begin
for i: = 1 to n do
for j: = 1 to b do // get numbers and write them into an array
m [i, j]: = random (101) -50;
for i: = 1 to n do // display the resulting array on the screen
begin
for j: = 1 to b do
write (m [i, j]: 4);
writeln;
end;
for i: = 1 to n do
for j: = 1 to b do
if m [i, j]> 0 then k: = k + m [i, j]; // check if the element is positive, then we get the sum by adding another element from the array to it
write (‘sum of positive array elements =’, k); // display the answer
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.