An array of integers A (5,5) is given. Find the smallest positive element.

program zz1;
const n = 5; // set the number of elements in the array
var mas: array [1..n, 1..n] of integer;
i, min, j: integer;
begin
for i: = 1 to n do
for j: = 1 to n do
mas [i, j]: = random (21) -10; // enter numbers into the array randomly from 1 to 20

for i: = 1 to n do
begin
for j: = 1 to n do
write (mas [i, j]: 5); // display the numbers from the array to the screen
writeln; // go to a new line for output
end;
min: = 1,000,000; // set the initial value of the minimum number (maximum possible)
for i: = 1 to n do
for j: = 1 to n do
if (mas [i, j]> 0) and (mas [i, j] <min) then min: = mas [i, j]; // check if the number from the array is greater than zero and less than the minimum, then write it to the minimum
write (‘the minimum positive element of the array is’, min); // 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.