[新手上路]批处理新手入门导读[视频教程]批处理基础视频教程[视频教程]VBS基础视频教程[批处理精品]批处理版照片整理器
[批处理精品]纯批处理备份&还原驱动[批处理精品]CMD命令50条不能说的秘密[在线下载]第三方命令行工具[在线帮助]VBScript / JScript 在线参考
返回列表 发帖
  1. @echo off
  2. :start
  3. set /a a=%random%%%10
  4. set /a b=%random%%%10
  5. set /a c=%random%%%10
  6. set /a d=%random%%%10
  7. echo %a%
  8. echo %b%
  9. echo %c%
  10. echo %d%
  11. if %a% neq 0 (
  12. if %a% neq %b% (
  13.    if %a% neq %b% (
  14.       if %a% neq %c% (
  15.          if %a% neq %d% (
  16.             if %b% neq %c% (
  17.                if %b% neq %d% (
  18.                  if %c% neq %d% (echo %a%%b%%c%%d%) else goto start
  19.                               ) else goto start
  20.                            ) else goto start
  21.                         ) else goto start
  22.                      ) else goto start
  23.                    ) else goto start
  24.                 ) else goto start
  25.              ) else goto start
  26. pause
  27. goto start
  28. pause
复制代码
水平有限..全用IF来弄的.
能问问高手.除中间的goto start 外,其他除了最后一个.中间的可以不要吗???自己都弄晕了.

[ 本帖最后由 wangqi0077 于 2010-9-10 14:53 编辑 ]

TOP

返回列表