batman 当前离线
考官
荣誉版主
@echo off call :lp 16 echo %total% pause>nul&exit :lp if not defined num set /a num=%1,total=1 if %num% neq 0 set /a total*=num,num-=1&call :lp %num%复制代码
CrLf 当前离线
论坛巡查
@echo off set /a n=m=1 set bat="%~0" setlocal enabledelayedexpansion set "next=if ^!n^! leq 12 (set /a m*=n,n+=1&echo ^!next^!>>^!bat^!) else (echo ^!m^!&pause&exit)" (echo;&echo !next!)>>!bat!复制代码
TOP
523066680 (消遣区)当前离线
版主
@echo off set /p inp="1-7: " call :next %inp% a c b pause :next if %1 equ 0 goto :eof set /a now=%1-1 call :next %now% %2 %4 %3 echo,%1 from %2 to %3 set /a now=%1-1 call :next %now% %4 %3 %2复制代码
@echo off call:perm "a b c xy z" pause :perm <"c1 c2 ..."> // code by plp setlocal enabledelayedexpansion&set "s=%~1 " if "!s: =!" == "" (echo %~2)else for %%b in (%~1)do call:perm "!s:%%b =!" "%~2 %%b" endlocal&goto:eof复制代码
@echo off call:perm "1 2 3 4 5 6" pause :perm <"c1 c2 ..."> // code by plp set "s=%~1 " if "%s: =%" == "" (echo %~2 &goto:eof) for %%b in (%~1) do (call:perm "%%s:%%b =%%" "%~2%%b" &set "s=%~1 ")复制代码
评分人数
xxpinqz (YiFeng)当前离线
中校
悬崖之树 当前离线
上尉
@echo off setlocal enabledelayedexpansion set total=1 call :lp 16 echo %total% pause>nul&exit :lp set /a num=%1 if %num% neq 0 ( set /a total*=num,num-=1&call :lp !num! )复制代码
PakTC 当前离线
四级士官
@echo off Rem Combination.bat by Paktc call :func "abcd" "" pause &exit :func setlocal if %1=="" ( if not %2=="" (echo %~2) goto :eof ) set strnow=%~1 call :func "%strnow:~1%" "%~2%strnow:~0,1%" call :func "%strnow:~1%" "%~2" endlocal复制代码