program FindNumbers;
vari, num, sum, digit1, digit2, digit3: integer;
beginfor i := 102 to 987 dobegindigit1 := i div 100;digit2 := (i mod 100) div 10;digit3 := i mod 10;
end;end.
program FindNumbers;
var
i, num, sum, digit1, digit2, digit3: integer;
begin
sum := digit1 + digit2 + digit3;for i := 102 to 987 do
begin
digit1 := i div 100;
digit2 := (i mod 100) div 10;
digit3 := i mod 10;
if (sum mod 7 = 0) and (i mod 7 = 0) then
writeln(i);
end;
end.