Program Fun_with_arrays;
const
SIZE = 10;
var
a: array [1 .. SIZE, 1 .. SIZE] of integer;
min_elements: array [1 .. SIZE] of integer;
i, j, min: integer;
begin
for i := 1 to SIZE do
for j := 1 to SIZE do
a[i][j] := random(100);
writeln('Here is your matrix');
for i := 1 to SIZE do
begin
for j := 1 to SIZE do
write(a[i][j]:4);
writeln;
end;
for j := 1 to SIZE do
begin
min_elements[j] := a[1][j];
for i := 1 to SIZE do
begin
if a[i][j] < min_elements[j] then
min_elements[j] := a[i][j];
end;
end;
for j := 1 to SIZE do
a[SIZE][j] := min_elements[j];
writeln('Here is your changed matrix');
for i := 1 to SIZE do
begin
for j := 1 to SIZE do
write(a[i][j]:4);
writeln;
end;
readln;
end.