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.
posted @ 2010-01-01 21:06  SmartIOI  阅读(157)  评论(0)    收藏  举报
本站采用CC授权如需转载、引用文章,请务必附上作者及来源处。 Creative Commons License