program pr1;
var
i: Integer;
begin
for i := 1000 to 9999 do begin
if (i div 10) mod 10 <> (i div 100) mod 10 then
Write (i, ' ');
end;
ReadLn;
end.
- - - - - - - - - - - - - - - - - - - - -
program pr2;
a, b, i: Integer;
Write ('Введите А, В: ');
ReadLn (a, b);
for i := a to b do
if (i mod 2 <> 0) and (i mod 7 = 0) then
program pr1;
var
i: Integer;
begin
for i := 1000 to 9999 do begin
if (i div 10) mod 10 <> (i div 100) mod 10 then
Write (i, ' ');
end;
ReadLn;
end.
- - - - - - - - - - - - - - - - - - - - -
program pr2;
var
a, b, i: Integer;
begin
Write ('Введите А, В: ');
ReadLn (a, b);
for i := a to b do
if (i mod 2 <> 0) and (i mod 7 = 0) then
Write (i, ' ');
ReadLn;
end.