9. 一个两位数 x,个位上的数字与十位上的数字对调后得到第二个两位数 y;此时, y - x = 36。求所有这样的两位数。
program exExhaustive9_1;
const c = 36;
var
f, s : integer;
begin
for s := 1 to 9 do
for f := 1 to s-1 do
if (s*10+f-f*10-s = c) then writeln(s*10+f, '-', f*10+s, '=', c);
readln;
end.
const c = 36;
var
f, s : integer;
begin
for s := 1 to 9 do
for f := 1 to s-1 do
if (s*10+f-f*10-s = c) then writeln(s*10+f, '-', f*10+s, '=', c);
readln;
end.


浙公网安备 33010602011771号