- @echo off&setlocal enabledelayedexpansion
- set /a shuzi=%random%%%1000+1
- set /a shuzi1=%shuzi%*4-4
- for /l %%a in (1,1,9) do (
- for /l %%b in (0,1,9) do (
- for /l %%c in (0,1,9) do (
- for /l %%d in (0,1,9) do (
- if not %%a==%%b if not %%a==%%c if not %%a==%%d if not %%b==%%c if not %%b==%%d if not %%c==%
-
- %d (
- if not defined #%%a%%b%%c%%d (set /a n+=1&set #%%a%%b%%c%%d=1)
- if !n! geq !shuzi1! echo;%%a%%b%%c%%d&set /a t+=1
- if !t!==4 goto a
- )
- )
- )
- )
- )
- :a
- pause>nul
复制代码 这也算随机数了,就是值范围差不多,得改随机数。 |