下面给出本人的解吧:- @echo off
- rem 随机生成200个字符
- set "var=abcdefghijklnmopqrstuvwxyz0123456789+_/-"
- :begin
- set /a a=%random%%%40,n+=1
- call,set "str=%str%%%var:~%a%,1%%"
- if %n% neq 200 goto begin
- rem 在一行内分段输出
- :lp
- set /a m+=1
- set /p=%str:~,10% <nul&set "_%m%=%str:~,10%"
- set "str=%str:~10%"
- if defined str goto lp
- rem 分行输出分段后字符
- echo.&echo.&for /l %%i in (1,1,%m%) do call,echo %%_%%i%%
- pause>nul
复制代码
[ 本帖最后由 batman 于 2008-8-12 12:40 编辑 ] |