Other answers made it clear that the main problem is that !> Is not an operator.
I would suggest that since you are checking to see if marks within certain ranges, you take an extra extra step to format conditional expressions in order to use the following pattern:
if (80 <= marks && marks <= 100) { grade = "A1"; } else if (70 <= marks && marks <= 79) { grade = "A2"; }
This is a simple and maybe subtle change, but I think that makes the definition of range checking a lot clearer.
source share