Ответы
Ответ дал:
0
Const
N = 7;
Var
A:array[1..N,1..N] of shortint;
i,j,iMin,jMin:byte;
Begin
Randomize;
WriteLn('A(',N,',',N,'):');
For i:= 1 to N do
Begin
For j:= 1 to N do
Begin
A[i,j]:=random(21)-10;
Write(A[i,j]:3,' ')
End;
WriteLn;
End;
iMin:=1;
jMin:=1;
For i:= 1 to N-1 do
For j:= 1 to N-i do
if A[i,j] < A[iMin,jMin] then
Begin
iMin:=i;
jMin:=j;
End;
WriteLn('Min(A) = A[',iMin,',',jMin,'] = ',A[iMin,jMin]);
End.
N = 7;
Var
A:array[1..N,1..N] of shortint;
i,j,iMin,jMin:byte;
Begin
Randomize;
WriteLn('A(',N,',',N,'):');
For i:= 1 to N do
Begin
For j:= 1 to N do
Begin
A[i,j]:=random(21)-10;
Write(A[i,j]:3,' ')
End;
WriteLn;
End;
iMin:=1;
jMin:=1;
For i:= 1 to N-1 do
For j:= 1 to N-i do
if A[i,j] < A[iMin,jMin] then
Begin
iMin:=i;
jMin:=j;
End;
WriteLn('Min(A) = A[',iMin,',',jMin,'] = ',A[iMin,jMin]);
End.
Вас заинтересует
5 лет назад
5 лет назад
8 лет назад
8 лет назад
8 лет назад
8 лет назад