Uses Crt;
Const
N = 3;
M = 4;
Var
A,B:array[1..N,1..M] of real;
i,j:integer;
Min,Max:real;
Begin
ClrScr;
Randomize;
Min:=1;
Max:=1;
WriteLn('Массив B:');
For i:= 1 to N do
Begin
For j:= 1 to M do
Begin
B[i,j]:=random(20)+1;
Write(B[i,j]:3,' ')
End;
WriteLn
End;
Max:=B[1,1];
Min:=B[1,1];
For i:= 1 to N do
For j:= 1 to M do
Begin
if B[i,j] > Max then Max:=B[i,j];
if B[i,j] < Min then Min:=B[i,j];
End;
WriteLn('Min(B) = ',Min);
WriteLn('Max(B) = ',Max);
WriteLn('Массив A:');
For i:= 1 to N do
Begin
For j:= 1 to M do
Begin
A[i,j]:=(2*B[i,j]+Min)/Max;
Write(A[i,j]:6:3,' ');
End;
WriteLn
End;
ReadLn
End.