Write a program for calculating the product of positive elements of the third line of a two-dimensional array of integers

The solution of the problem:
var i, j: byte;
a: array [1..100,1..100] of integer;
n, k, pr: integer;
begin
write (‘Enter dimension n (n> = 3):’);
readln (n);
randomize;
k: = 0;
for i: = 1 to n do
begin
for j: = 1 to n do
begin
a [i, j]: = random (9) -4;
write (a [i, j]: 5);
if (i = 3) and (a [i, j]> 0) then k: = k + 1;
end;
writeln;
end;
writeln;
if k = 0 then write (‘Answer: there are no positive elements in the third line of the array.’)
else begin
pr: = 1;
for j: = 1 to n do if (a [3, j]> 0) then pr: = pr * a [3, j];
writeln (‘Answer: product of positive elements of the third line =’, pr);
end;
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.