@echo off set a=2 :1 set /a a*=2 if not %a:~0,1%==- goto 1 echo 最小的负数是:%a% set /a a-=1 echo 最大的正数是:%a% pause