
CODE: [Copy to clipboard][ Last edited by moniuming on 2008-12-22 at 14:36 ]@echo off
for /l %%a in (1 1 2000) do (call :rdm)
goto :eof
:rdm
set str=%random%%random%%random%%random%
set str=%str:~-5%
if defined _%str% goto :rdm
set _%str%=ok
>>rst.txt set/p=%str% <nul
CODE: [Copy to clipboard][ Last edited by pusofalse on 2008-12-22 at 16:18 ]@Echo Off & setlocal EnableDelayedExpansion
For /L %%a in (1001 1 3000) do (
set /a n=!random! %% 9 + 1
set .!random!!random!=!n!%%a
)
For /F "tokens=2 delims==" %%a in ('set .') do Echo>>num.txt %%a
start "" "num.txt"
| 欢迎光临 中国DOS联盟论坛 (http://cndos.fam.cx/forum/) | Powered by Discuz! 2.5 |