I recently wrote a code for hw and when my TA graded it he marked me off for wrong use of const type and redefinition along with incorrect use of if, else if. I'm not sure what he means by that so I can fix it in future assignments.
Although that code works, it works in a horrible way, and I don't know whether to be impressed or horrified. How you came up with it is a mystery.
You should not be assigning those boolean expressions to integer constants - it doesn't make sense. This is part of why your TA counted off.
Your code happens to work because those boolean expressions get silently converted to integer values of 0 or 1, and then your if statements re-assign the value of grade and then implicitly convert it to true or false.
Also, you have duplicated (copied and pasted) your code - this is very bad, and you need to find a way to get the same effect without copypasting. This is the other reason yout TA counted off.
I would delete lines 8-13 and rewrite lines 15-26 so that they are proper conditionals and not the derpy combination of luck you currently have. For example: