本帖最后由 回家路上 于 2015-9-8 12:18 编辑
- @echo off & setlocal enabledelayedexpansion
- set i=9
- set j=5
- set /a "d=(%i%+1)/%j%+^!^!((%i%+1)%%%j%)"
- for /l %%i in (0 1 %i%)do (
- set /a x=%%i/%d%+1
- echo;192.168.0.%%i 192.168.50.!x!
- )
- pause & exit /b
复制代码
- @echo off & setlocal enabledelayedexpansion
- set i=9
- set j=5
- for /l %%i in (0 1 %i%)do (
- set /a x=%%i%%%j%+1
- echo;192.168.0.%%i 192.168.50.!x!
- )
- pause & exit /b
复制代码
|