Board logo

标题: [游戏娱乐] 批处理九九法则表 [打印本页]

作者: batman    时间: 2008-6-18 19:49     标题: 批处理九九法则表

  1. @echo off&setlocal enabledelayedexpansion
  2. set "var=+ - * /"
  3. for /f "tokens=1-4 delims= " %%a in ("%var%") do call :lp %%a %%b %%c %%d
  4. pause>nul
  5. :lp
  6. for /l %%i in (1,1,9) do (
  7.     for /l %%j in (1,1,%%i) do (
  8.         set /a a=%%i%1%%j
  9.         if !a! lss 10 set a= !a!
  10.         set str=!str! %%i%1%%j=!a!
  11.         if %%i equ %%j echo !str!&set "str="
  12.     )
  13. )
  14. if "%1" equ "/" goto :eof
  15. shift
  16. goto lp
复制代码





欢迎光临 批处理之家 (http://bathome.net./) Powered by Discuz! 7.2