Const
m = 3;
n = 4;
Var
A,R:array[1..m,1..n] of shortint;
i,j:integer;
Begin
Randomize;
WriteLn('R(',m,',',n,'):');
For i:= 1 to m do
Begin
For j:= 1 to n do
Begin
R[i,j]:=random(21)-10;
Write(R[i,j]:3,' ')
End;
WriteLn
End;
WriteLn('A(',m,',',n,'):');
For i:= 1 to m do
Begin
For j:= 1 to n do
Begin
A[i,j]:=i+j-R[i,j];
Write(A[i,j]:3,' ')
End;
WriteLn
End;
End.