Const
n = 3;
m = 4;
Var
B:array[1..n,1..m] of integer;
i,j,A,C:integer;
S:real;
Begin
WriteLn('Введите массив B[',n,',',m,']:');
For i:= 1 to n do
For j:= 1 to m do
Read(B[i,j]);
Write('A = ');ReadLn(A);
Write('C = ');ReadLn(C);
S:=0;
For i:= 1 to n do
For j:= 1 to m do
if (A S:=S+B[i,j];
WriteLn('S = ',S);
End.