Цитата
PROGRAM p;
VAR
pr1, pr2, i, n1, n2, n : longint;
BEGIN
n:=0;
Write('Ot... ');
Readln(pr1);
Write('Do... ');
Readln(pr2);
while (pr1=pr2) or (pr1>pr2) or (pr1<0)
do Write('Error!!!');
for i:=pr1 to pr2 do
begin
n1:=(i div 1000);
n2:=(i mod 1000);
if
(n1 div 10)-(n1 div 100)*9+(n1 mod 10)=
(n2 div 10)-(n2 div 100)*9+(n2 mod 10)
then
begin
Writeln(i);
n:=n+1
end;
end;
writeln(n);
read(n)
end.
VAR
pr1, pr2, i, n1, n2, n : longint;
BEGIN
n:=0;
Write('Ot... ');
Readln(pr1);
Write('Do... ');
Readln(pr2);
while (pr1=pr2) or (pr1>pr2) or (pr1<0)
do Write('Error!!!');
for i:=pr1 to pr2 do
begin
n1:=(i div 1000);
n2:=(i mod 1000);
if
(n1 div 10)-(n1 div 100)*9+(n1 mod 10)=
(n2 div 10)-(n2 div 100)*9+(n2 mod 10)
then
begin
Writeln(i);
n:=n+1
end;
end;
writeln(n);
read(n)
end.