
CODE: [Copy to clipboard]这样不行吗?@echo off
setlocal enabledelayedexpansion
for /l %%n in (100,1,1000) do (
set a=%%n
set x=!a:~0,1!
set y=!a:~1,1!
set z=!a:~2,1!
set /a x=!x!
set /a y=!y!
set /a z=!z!
set /a sum=!x!*!x!*!x!+!y!*!y!*!y!+!z!*!z!*!z!
if !a! equ !sum! echo !a!
)
pause
| 欢迎光临 中国DOS联盟论坛 (http://cndos.fam.cx/forum/) | Powered by Discuz! 2.5 |