https://blog.csdn.net/qq_38851937/article/details/89303795 scanf和cin都是遇到空格键结束,而getS()以换行键结束 必须用gets(),因为输入的一串字符会有空格。