program b11;
var i, p, max: integer;
B: array [1..10] of integer;
begin
randomize;
p := 0;
for i := 1 to 10 do
begin
B[i] := random(10);
write(B[i], ' ');
end;
for i := 1 to 10 do
if B[i] mod 3 = 0 then begin
p := p + B[i];
if b[i] > max then max := b[i]
end;
writeln;
writeln('Сумма чисел кратных 3 = ', p);
writeln('Максимальное число, кратное 3 = ', max);
readln;
end.