我想问你一个问题。
我正在创建一个简单的程序来扫描数字(人们的成绩)并检查它们是否在某个范围内(例如,75% 到 90%),如果它们在某个范围内,请执行以下命令;这是代码。
(代码下方有更多文字)
@echo off
color a
title Happy Factor Decoder
echo Hello!
set /p eg="Exam Grade (RAW): "
set /p teg="TOTAL RAW Exam Grade (The highest score): "
echo Calculating
set /a m=%teg% - %eg%
echo You had %m% mistakes
echo Breaking down...
timeout /t 1 >nul
set /a bdf1=%eg% / 4
echo %bdf1%
set /a bdf2=%teg% / 4
echo %bdf2%
set /a bdf3=%m% / 4
echo %bdf3%
echo I BROKE IT DOWN YEAH :D
if %eg% == 4 goto happy
if %eg% == 3 goto kindahappy
if %eg% == 2 goto kindasad
if %eg% == 1 goto sad
:happy
echo Your father will be happy about this
pause
:kindahappy
echo Your father will be KINDA happy about this
pause
:kindasad
echo Your father will be KINDA sad about this
pause
:sad
echo Your father will be sad about this
pause
你看,我想要它做的是这个(在伪代码中)
IF BDF1 IS AT CERTAIN RANGE (80-90) GOTO HAPPY
有任何想法吗?