The elements of the two-dimensional array A (7,8) are formed by the random number generator from the interval

The elements of the two-dimensional array A (7,8) are formed by the random number generator from the interval [-20,70]. Organize the printing of the entire array in the form of a table, as well as array elements in even columns.

First, we create a loop that fills an array with random elements.
The random (90) function is used because it cannot generate negative numbers, so we set it to a limit of 90 and then subtract 20 from the random number so that this number does not exceed the specified bounds of 70.

var
a: array [1..7,1..8] of integer;

begin
writeln (‘Outputting the entire array:’);
for i: integer: = 1 to 7 do
begin
for j: integer: = 1 to 8 do
begin
a [i, j]: = random (90) -20;
write (a [i, j]: 6);
end;
writeln ();
end;
writeln (‘Output even columns of an array:’);

for i: integer: = 1 to 7 do
begin
for j: integer: = 1 to 8 do
begin
if j mod 2 = 0 then
write (a [i, j]: 6);
end;
writeln ();
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.