Const nx=20;mx=20;var i,j,n,S,a,m:integer; D:array[1..nx,1..nx] of integer;
begin
write('Введите размер матрицы n и m');Readln(n,m);
write('Введите число А');Readln(a);
for i:=1 to n do begin
for j:=1 to m do begin
D[i,j]:= random(100)-50;
write(D[i,j]:4);
if D[i,j] > a then S:= S + D[i,j];
end;writeln;end;
writeln;
write('S=',S:5);
end.