You say you are a sock puppet =。=
Union site: www.cn-dos.net Forum site: www.cn-dos.net/forum
DOS stands for freedom, openness and progress. Let us work hard, learn from the openness and GNU spirit of FreeDOS and Linux, and together build and grow a free GNU GPL world!
Originally posted by 26933062 at 2008-5-7 19:44:
Reply to post 12
Sorry, the answer is still incorrect. Maybe I didn't describe it clearly enough.
The space cannot be directly above each letter.
Let me put it this way
Randomly generate the first letter. For example, if it is a, then...
@echo off&setlocal enabledelayedexpansion
set "str=ab"&set /a a=%random%%%60+1
:begin
set /a b=%random%%%2
set c=!str:~%b%,1!&set var=%var%!c!
set /a n+=1
if %n% lss %a% goto begin
echo The following is the generated string for this time:
echo %var%
set "str="&set n=0
:lp
if !n! lss 60 if defined var (
set /a b=%random%%%2
if !b! equ 0 (
set "b= "
) else (
set b=!var:~,1!&set /a n+=1
)
set str=%str%!b!
set var=%var:~1%
goto lp
)
echo.%str%
if !n! lss 60 set var=%str%&set str=&goto lp
pause>nulOriginally posted by pusofalse at 2008-5-7 22:21:
ababababababababa
xbxbxxabaxxbaxxxa
xbxxxxaxaxxbaxxxx
xxxxxxaxaxxbaxxxx
xxxxxxxxaxxbxxxxx
xxxxxxxxxxxbxxxxx
x represents a space
For example, the 2nd character of the first line is b, and by the fourth line, the 2nd character...
Originally posted by zw19750516 at 2008-5-7 10:24 PM:
If that's the case, please run my code at 17.