batch file - If number is at certain range, do (command here) -


i ask question.

i creating simple program scans numbers (people's grades) , checks if @ range (say, 75% 90%) , if @ range, following command; here's code.

(more text below code)

@echo off color 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 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 broke 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 father happy pause  :kindahappy echo father kinda happy pause  :kindasad echo father kinda sad pause  :sad echo father sad pause 

you see, want (in pseudocode)

if bdf1 @ range (80-90) goto happy 

any ideas?

i don't know units of calculations, can check range lowest high:

@echo off &setlocal rem calculation here if %bdf1% leq 25 goto :sad if %bdf1% leq 50 goto :kindasad if %bdf1% leq 75 goto :kindahappy if %bdf1% leq 100 goto :happy echo uups! goto:eof  :sad echo sad goto:eof  :kindasad echo kindased goto:eof  :kindahappy echo kindahappy goto:eof  :happy rem please enter code here :) 

Comments

Popular posts from this blog

php - get table cell data from and place a copy in another table -

javascript - Mootools wait with Fx.Morph start -

php - Navigate throught databse rows -