程序12- @echo off
- SetLocal EnableDelayedExpansion
- for /l %%i in (101,2,200) do (
- set num=%%i
- call :judge
- )
- pause>nul
- :judge
- set times=2
- for /l %%a in (1,1,3) do (
- set /a times+=%%i/times
- set /a times/=2
- )
- for /l %%j in (3,2,%times%) do (
- set /a value=%%i %% %%j
- if !value!==0 goto :eof
- )
- echo %num%
复制代码 用了牛顿迭代法开平方 感觉效率还可以 |