水仙花数
2011-05-21 08:56
253 查看
for a=1 to 9
for b=0 to 9
for c=0 to 9
if(100*a+10*b+c=a*a*a+b*b*b+c*c*c)
? 100*a+10*b+c
endif
endfor
endfor
endfor
for b=0 to 9
for c=0 to 9
if(100*a+10*b+c=a*a*a+b*b*b+c*c*c)
? 100*a+10*b+c
endif
endfor
endfor
endfor