主题:帮帮忙
qwertyiop
[专家分:10] 发布于 2009-04-13 19:03:00
1.打印出1000以内倒顺读都一样的数
回复列表 (共1个回复)
沙发
日奈森亚梦 [专家分:150] 发布于 2009-04-13 19:06:00
Program blf;
var a,b,c,s:integer;
begin
for a:=0 to 9 do
for b:=0 to 9 do
for c:=1 to 9 do
begin
s:=a*100+b*10+c;
if ((b=c) and (a=0)) or((b=0) and (c<>0)) or (a=c) then
write(s:5);
end;
end.
我来回复