原帖由 523066680 于 2008-8-17 21:29 发表
好,那我就出新的对策,看代码。横竖打乱后,再多次随机调换数字。@echo off
title made by cn-dos and bathome - 523066680
setlocal enabledelayedexpansion
:start
set h1=123456789
set h2=234567891
set ...
我11楼的看法就是在开始打乱行 我想效果一样
下面是随风的代码 我在前面先乱它一下
- @echo off&setlocal enabledelayedexpansion
- for /l %%i in (0 1 9) do set _!random!!random!!random!=%%i
- for /f "tokens=2 delims==" %%i in ('set _') do set sz=%%i!sz!
- for /l %%i in (0 1 9) do (
- set var%%i=!sz:~1!!sz:~0,1!
- set "sz=!var%%i!"
- set ".!random!!random!!random!=%%i"
- set "#!random!!random!!random!=%%i"
- )
- for /f "tokens=2 delims==" %%a in ('set .') do set var=!var! %%a
- for /l %%a in (0 1 9) do (
- for %%i in (!var!) do set num%%a=!var%%a:~%%i,1! !num%%a!
- )
- for /f "tokens=2 delims==" %%a in ('set #') do echo !num%%a!
- pause
复制代码
|