
不知道行數,每行后面有換行符
uj5u.com熱心網友回復:
題目描述:互聯網中存在許多的不和諧詞匯,在我們瀏覽互聯網的時候,搜索引擎經常會出現提示資訊“根據相關法律法規和政策,部分搜索結果未予顯示”。小王同學也想制作一個自己的屏蔽詞庫,這樣他就可以將自己不喜歡的詞匯從檔案中換成別的字符了。屏蔽詞庫是一個ASCII碼檔案,這個檔案中只含有單詞,每個單詞占一行,每個單詞中只可能有大小寫字母與空格。題目中和諧詞庫的檔案名為dict.dic。(屏蔽詞庫中每個詞匯長度小于10,屏蔽詞匯個數不超過10.)
你的任務是將輸入中的所有和諧詞庫中的詞語全部替換成“!@#$%^&*”(按住鍵盤shift和數字1至8),然后輸出。這里要注意,如果一個詞語中包含屏蔽詞匯,那么只將屏蔽詞匯替換,例如“hehasAAA”被處理后將得到“he!@#$%^&*AAA”,注意屏蔽詞匯區分大小寫,即aaa與AAA是兩個不同的單詞,為了使問題簡化,屏蔽詞匯中不會出現互相包含的情況,如“xabcx”與“abc”不會同時出現在同一個屏蔽詞庫中。由于小王同學很不擅長檔案操作,所以他希望你能幫他制作這個屏蔽詞匯程式。
uj5u.com熱心網友回復:
The night falls gently. And you are not here. I missing you more and more and I start getting worried asI stare at the door just waiting for you to surprise me with your arrival at any moment.
Sweet delusion... you are so far away right now that all I can ask for is that time moves faster...
uj5u.com熱心網友回復:
輸出:如果屏蔽詞庫如下:
is
good
are
the
ha ha
some
get
has
more
bad
則輸出:
The night falls gently. And you !@#$%^&* not here. I m!@#$%^&*sing you !@#$%^&* and !@#$%^&* and I start !@#$%^&*ting worried as
I st!@#$%^&* at !@#$%^&* door just waiting for you to surpr!@#$%^&*e me with your arrival at any moment.
Sweet delusion... you !@#$%^&* so far away right now that all I can ask for !@#$%^&* that time moves faster...
轉載請註明出處,本文鏈接:https://www.uj5u.com/houduan/103060.html
標籤:C語言
上一篇:關于fopen函式無回傳值的問題
下一篇:dev c ++源檔案未編譯
