7-1?字符串替換(10?分)將文本文件中指定的字符串替換成新字符串。 由于目前的OJ系統暫時不能支持用戶讀入文件,我們編寫程序從鍵盤輸入文件中的內容,當輸入的一行為end時,表示結束。end后面有兩個字符串,要求用第二個字符串替換文本中所有的第一個字符串。輸入格式:Xi’an Institute of Posts and Telecommunications is co-designed and implemented by the People’s Government of Shaanxi Province and the Ministry of Industry and Information Technology. The Institute is located in Xi’an, a historic city in Northwest China, famous for its magnificent ancient culture.end (表示結束)Institute (第一個字符串,要求用第二個字符串替換)University (第二個字符串)輸出格式:Xi’an University of Posts and Telecommunications is co-designed and implemented by the People’s Government of Shaanxi Province and the Ministry of Industry and Information Technology.The University is located in Xi’an, a historic city in Northwest China, famous for its magnificent ancient culture.
大神求教java
540Immortal
2018-05-21 15:58:45