Author Options:


Hi! I'm new in batch coding using cmd. I need help. My teacher gave me an exercise where once you put a grade it will show the equivalent standing of that grade:
91-100 - excellent
81-90 -Very Satisfactory
71-80 - Satisfactory
61-70 - Very Good
51-60 - Good
0-50 - Failed
Now I tried the code

if %num% GRT 91 echo Excellent
If %num% LSS 50 echo Failed

But the problem is I don't know how to do with the rest. As per my teacher there's no code such as '<=' or '>=' there are other activities with such problem. I just need to know how to figure this one out then I will be able to to do the rest. Please help me.

1 Replies

Matlek (author)2017-09-29

Hi! Have you ever code before? I am not a pro at coding, but from what I have learned, there is always someone that already had the same (or similar) problem and asked the question on a forum.

Use good keywords in google, and you will always find a quick answer.

Here are some clues for your problem: about the operators, and about the range.

Select as Best AnswerUndo Best Answer