@echo off
set /a secretNumber=%random% %% 100
echo Guess a number between 1 and 100.
echo.
:guess
set /p guessNumber=Your guess:
if %guessNumber% equ %secretNumber% (
echo Congratulations!
) else if %guessNumber% lss %secretNumber% (
echo Too low.
goto guess
) else (
echo Too high.
goto guess
)
pause
exit
很好玩吧~