Program Program1; var i,j,k:integer; A: array [1..6,1..4] of integer; begin randomize; for i:=1 to 6 do for j:=1 to 4 do a[i,j]:=random(100); k:=0; for i:=1 to 6 do for j:=1 to 4 do if a[i,j] mod 3 = 0 then inc(k); writeln('Кратны трем ',k,' элем.'); end.
Program Program1;
var
i,j,k:integer;
A: array [1..6,1..4] of integer;
begin
randomize;
for i:=1 to 6 do
for j:=1 to 4 do
a[i,j]:=random(100);
k:=0;
for i:=1 to 6 do
for j:=1 to 4 do
if a[i,j] mod 3 = 0 then inc(k);
writeln('Кратны трем ',k,' элем.');
end.