The question has three scenarios: when x = y, xy, so I don't think you need to use x!=y anyway. Those are the conditions under a series of if/else if/else statements.