Procedure TForm1.Button1Click(Sender: TObject);
var
i1,i2,i3 : Integer;
kk : Integer;
Chislo : Integer;
begin
Memo1.Clear;
kk := 0;
for i1 := 1 to 9 do
for i2 := 0 to 9 do
for i3 := 0 to 9 do
if ( (i1<>i2) and (i1<>i3) and (i2<>i3) ) then
if ( Frac((i1+i2+i3)/7)=0 ) then
begin
Chislo := i1*100 + i2*10 + i3;
if ( Frac(Chislo/7)=0 ) then
begin
Memo1.Lines.Append(inttostr(Chislo));
inc(kk);
end;
end;
end;