const
n=20;
type
mas = array [1..n] of integer;
procedure search(massive : mas);
var j,s : integer;
begin
s:=0;
for j:=1 to n do
if massive[j] mod 3 = 0 then
s := s + massive[j];
writeln;
writeln('сумма чисел кратных 3: ', s);
end;
var
i, k : integer;
a : mas;
write('массив:');
for i:=1 to n do
a[i]:=random(100)+200;
write(a[i]:4)
search(a);
end.
const
n=20;
type
mas = array [1..n] of integer;
procedure search(massive : mas);
var j,s : integer;
begin
s:=0;
for j:=1 to n do
if massive[j] mod 3 = 0 then
s := s + massive[j];
writeln;
writeln('сумма чисел кратных 3: ', s);
end;
var
i, k : integer;
a : mas;
begin
write('массив:');
for i:=1 to n do
begin
a[i]:=random(100)+200;
write(a[i]:4)
end;
search(a);
end.