Const nx=30; mx=30;var r:array[1..nx,1..mx] of integer;i,j,n,m,k,sum:integer; sr:real;
beginrandomize;write('Введите n и m: ');readln(n, m);
writeln('Исходная матрица: ');for i:=1 to n dobeginfor j:=1 to m dobeginr[i,j]:=random(78)+17;write(r[i,j]:4);end;writeln;end;writeln;for i:=1 to n dobeginfor j:=1 to m dobeginif r[i,j] mod 5 = 0 Then beginsum:= sum + r[i,j];write(r[i,j]:4);end;end;end;writeln;write(sum:4);end.