本帖最后由 cobat 于 2015-3-11 13:32 编辑
- @echo off
- setlocal enabledelayedexpansion
- for /l %%a in (1,1,10) do set _%%a=%%a
- for /l %%a in (10,-1,1) do (
- set /a mod=!random!%%%%a+1
- for %%b in (!mod!) do echo !_%%b!
- set/a _!mod!=_%%a
- )
- pause
复制代码
- @echo off
- setlocal enabledelayedexpansion
- for /l %%a in (1,1,10) do set _!random!_%%a=%%a
- for /f "tokens=2 delims==" %%a in ('set _') do echo %%a
- pause
复制代码
|