Program asd; Const n=4; m=3; Var A:array[1..n,1..m] of integer; B,jd,id:array[1..n] of integer; i,j,k,min,ii,jj:integer; BEGIN For i:=1 to n do begin For j:=1 to m do begin A[i,j]:=2+Random(8); Write(A[i,j],' '); end; Writeln; end; Writeln; ii:=1; For i:=1 to n do begin min:=1000; for j:=1 to m do begin jj:=1; If A[i,j]<=min then begin min:=A[i,j]; id[i]:=i; jd[i]:=j; end; end; B[i]:=min; end; For i:=1 to n do begin Writeln('Min: ',B[i],'. Строка: ',id[i],'; Столбец: ',jd[i],';'); end; END.
Const n=4;
m=3;
Var A:array[1..n,1..m] of integer;
B,jd,id:array[1..n] of integer;
i,j,k,min,ii,jj:integer;
BEGIN
For i:=1 to n do
begin
For j:=1 to m do
begin
A[i,j]:=2+Random(8);
Write(A[i,j],' ');
end;
Writeln;
end;
Writeln; ii:=1;
For i:=1 to n do
begin
min:=1000;
for j:=1 to m do
begin
jj:=1;
If A[i,j]<=min then
begin
min:=A[i,j];
id[i]:=i;
jd[i]:=j;
end;
end;
B[i]:=min;
end;
For i:=1 to n do
begin
Writeln('Min: ',B[i],'. Строка: ',id[i],'; Столбец: ',jd[i],';');
end;
END.