The input expected is just a single char, so if you type "a=1" as your input, that's not just a single char. That's three chars.
(a==1) Here, 1 is the number 1. I expect you actually want the char '1'. 1 is not the same as '1'. 1 is a number. '1' is a char.