var
a: array[1..20, 1..20] of integer;
n, m, i, j, jm: integer;
begin
randomize;
writeln('Введите количество строк и столбцов соответственно: ');
readln(n, m);
writeln('Сгенерированная матрица: ');
for i := 1 to n do
jm := 1;
for j := 1 to m do
a[i, j] := random(99);
write(a[i, j]:4);
if (i mod 2 = 0) and (a[i, jm] > a[i, j])
then jm := j;
end;
if i mod 2 = 0 then write(' min=a[', i, ',', jm, ']=', a[i, jm]);
writeln;
readln;
end.
Copyright © 2024 SCHOLAR.TIPS - All rights reserved.
Answers & Comments
var
a: array[1..20, 1..20] of integer;
n, m, i, j, jm: integer;
begin
randomize;
writeln('Введите количество строк и столбцов соответственно: ');
readln(n, m);
writeln('Сгенерированная матрица: ');
for i := 1 to n do
begin
jm := 1;
for j := 1 to m do
begin
a[i, j] := random(99);
write(a[i, j]:4);
if (i mod 2 = 0) and (a[i, jm] > a[i, j])
then jm := j;
end;
if i mod 2 = 0 then write(' min=a[', i, ',', jm, ']=', a[i, jm]);
writeln;
end;
readln;
end.