Var A:array[1..1000,1..1000] of integer; M,N,Mi,Mj:integer; Begin Write('M(1..1000) = ');ReadLn(M); Write('N(1..1000) = ');ReadLn(N); For var i:= 1 to M do Begin For var j:= 1 to N do Begin A[i,j]:=random(1,M*N); Write(A[i,j],' ') End; WriteLn; End; Mi:=M; Mj:=N; For var i:= 1 to M do For var j:= 1 to N do if A[Mi,Mj]<A[i,j] then Begin Mi:=i; Mj:=j End; WriteLn('Max(A): A[',Mi,',',Mj,'] = ',A[Mi,Mj]); End.
M,N,Mi,Mj:integer;
Begin
Write('M(1..1000) = ');ReadLn(M);
Write('N(1..1000) = ');ReadLn(N);
For var i:= 1 to M do
Begin
For var j:= 1 to N do
Begin
A[i,j]:=random(1,M*N);
Write(A[i,j],' ')
End;
WriteLn;
End;
Mi:=M;
Mj:=N;
For var i:= 1 to M do
For var j:= 1 to N do
if A[Mi,Mj]<A[i,j] then
Begin
Mi:=i;
Mj:=j
End;
WriteLn('Max(A): A[',Mi,',',Mj,'] = ',A[Mi,Mj]);
End.