@echo off
set rdm=%random%
echo %rdm%
if %rdm% gtr 10000 (echo rdm is greater than 10000) else (echo rdm is less than 10000)
pause>nul
4、检测用户输入的变量是否为:A,如果是,则显示:你输入的为A
否则,显示:你输入的不为A
@echo off
set /p test=Please enter something:
echo %test%
if %test%==A (echo You enter an A) else (echo You enter not an A)
pause>nul