program mas_krat_3i5;
const n=15;
var
a:array[1..n] of integer;
i,s:integer;
begin
for i:=1 to n do
a[i]:=random(101);
write(a[i],' ');
writeln;
if (a[i]mod 3 =0)and(a[i]mod 5 =0)
then
s:=s+a[i];
write(s);
readln;
end.
program mas_krat_3i5;
const n=15;
var
a:array[1..n] of integer;
i,s:integer;
begin
for i:=1 to n do
a[i]:=random(101);
for i:=1 to n do
write(a[i],' ');
writeln;
for i:=1 to n do
if (a[i]mod 3 =0)and(a[i]mod 5 =0)
then
s:=s+a[i];
write(s);
readln;
end.