精品偷拍一区二区三区,亚洲精品永久 码,亚洲综合日韩精品欧美国产,亚洲国产日韩a在线亚洲

  • <center id="usuqs"></center>
  • 
    
  • c# 求提供思路,我str1“i want to eat an apple” str2"i want eat apple"用什么方法可以識別出str2少了

    c# 求提供思路,我str1“i want to eat an apple” str2"i want eat apple"用什么方法可以識別出str2少了
    to 和an兩個單詞
    英語人氣:165 ℃時間:2020-03-24 23:12:38
    優(yōu)質(zhì)解答
    string str1="i want to eat an apple"; string str2="i want eat apple"; Console.WriteLine(str1.Length); Console.Write(str2.Length); Console.ReadKey();第一個長度是...謝謝,那我怎么知道少了什么呢。。。string[] aa;string[] bb; string str1="i want to eat an apple"; string str2="i want eat apple"; aa = str1.Split(' '); bb = str2.Split(' '); int count=0; foreach(string c in aa) { count = 0; for (int i = 0; i < bb.Length; i++) { if (c != bb[i]) { count++;} if (count == bb.Length) { Console.Write(c+' '); } } }Console.ReadKey();已經(jīng)把to和an兩個缺失的單詞在控制臺輸出了。你拿去用吧。
    我來回答
    類似推薦
    請使用1024x768 IE6.0或更高版本瀏覽器瀏覽本站點,以保證最佳閱讀效果。本頁提供作業(yè)小助手,一起搜作業(yè)以及作業(yè)好幫手最新版!
    版權(quán)所有 CopyRight © 2012-2024 作業(yè)小助手 All Rights Reserved. 手機(jī)版