Hi! Just a newbie here. I need some help regarding with my project. This is like my 1 time in batch coding and not familiar yet with the codes. My teacher gave me a homework where I need to create a grade system using batch file.
**************************************
The out should be like tis. When you enter the grade it should display the ff:
91-100 = Excellent
81-90 = Very Satisfactory
71-80 = Satisfactory
61-70 = Very Good
51-60 = Good
0-50 = Failed
**************************************
Now I tried the ff code:
If %num% is GRT 90 echo Excellent
If %num% LSS 50 echo Failed
The only problem is I don't know what copde I should use for the rest. As per my teacher there's no command '<=' pr '>=' is batch coding. Any tips how to solve this? There's another activity but it's pretty much the same. I just want to know how to to thru this and I'm pretty ure I will be able to figure the other activity. Thanks in advance!
Basic If Statment BATCH CODING
Moderator: DosItHelp
Re: Basic If Statment BATCH CODING
I am afraid I don't understand what exactly you want from us. Programmers may solve the same problem in different ways, and that depends on the way people thinks. There is no way to teach you to think in a certain way...
I suggest you to try different approachs until you advance in the solution and then make a specific question. The experience you will get via this method is a valuable thing you will not acquire in any other way.
Antonio
I suggest you to try different approachs until you advance in the solution and then make a specific question. The experience you will get via this method is a valuable thing you will not acquire in any other way.
Antonio
-
- Posts: 118
- Joined: 02 Apr 2017 06:11
Re: Basic If Statment BATCH CODING
I agree totally with Aacini and I suggest you first read the help of the IF command (the way to do that is described by Squashman) and then experiment with the multiple arguments of the IF command.
This method (Trial and Error) may take long, but if you have the time and if you put the right effort into it, you can be a professional Batch Programmer in only a few weeks.
Hope I helped,
PaperTronics
This method (Trial and Error) may take long, but if you have the time and if you put the right effort into it, you can be a professional Batch Programmer in only a few weeks.
Hope I helped,
PaperTronics