Const N = 5; M = 3; Var X:array[1..N,1..M] of integer; i,j:integer; S:real; Begin Randomize; WriteLn('Исходный массив:'); For i:= 1 to N do Begin For j:= 1 to M do Begin X[i,j]:=random(41)-20; Write(X[i,j]:3,' ') End; WriteLn End; WriteLn('Новый массив:'); For i:= 1 to N do Begin For j:=1 to M do Begin if X[i,j] mod 5 = 0 then X[i,j]:=0; S:=S+X[i,j]; Write(X[i,j]:3,' ') End; WriteLn End; WriteLn('S = ',S); ReadLn End.