练练手: | @echo off | | set /a x=13,y=29,z=3,m=0,n=0 | | setlocal enabledelayedexpansion | | :o | | for /l %%a in (!x!,1,!y!) do ( | | if not defined #%%a ( | | set /a m+=1 | | set /a l=m%%z | | if !l!==0 ( | | set #%%a=false | | set /a n+=1 | | if !n! == !y! echo %%a&goto :p | | ) | | ) | | ) | | if !n! lss !y! set x=1&goto :o | | :p | | pause | | goto :eofCOPY |
|