现在来回贴 还有人看么?
- @echo off&setlocal enabledelayedexpansion
- set str=abcdefghijklmnopqrstuvwxyz
- set /p inp="[1-26] : "
- set /a ran=%random%%%25+1
- if %ran% equ %inp% set /a ran=26
- if %ran% gtr %inp% set /a i=ran,ran=inp,inp=i
- set /a ran-=1,inp-=ran
- set str=!str:~%ran%,%inp%!
- if "%str:~1,-1%"=="" (set ecx=空) else (set ecx=%str:~1,-1%)
- echo,%str:~0,1% 与 %str:~-1% 之间的符号为 %ecx%
- pause
复制代码
[ 本帖最后由 523066680 于 2009-3-8 13:12 编辑 ] |