用if else if else结构,不然你这个 不满足就执行else other ++了
题目都说了,最后一个回车不算在呢啊,你咋还算'\n'呢
试试永else if呢,你那个最后一个else相当于就只是第三个if的else,other应该就不太对