欧美色欧美亚洲高清在线观看,国产特黄特色a级在线视频,国产一区视频一区欧美,亚洲成a 人在线观看中文

  1. <ul id="fwlom"></ul>

    <object id="fwlom"></object>

    <span id="fwlom"></span><dfn id="fwlom"></dfn>

      <object id="fwlom"></object>

      編寫程序,統(tǒng)計出字符串“want you to know one thing”中字母N和字母O的出現(xiàn)次數(shù)

      時間:2019-05-13 09:01:47下載本文作者:會員上傳
      簡介:寫寫幫文庫小編為你整理了多篇相關(guān)的《編寫程序,統(tǒng)計出字符串“want you to know one thing”中字母N和字母O的出現(xiàn)次數(shù)》,但愿對你工作學(xué)習(xí)有幫助,當(dāng)然你在寫寫幫文庫還可以找到更多《編寫程序,統(tǒng)計出字符串“want you to know one thing”中字母N和字母O的出現(xiàn)次數(shù)》。

      第一篇:編寫程序,統(tǒng)計出字符串“want you to know one thing”中字母N和字母O的出現(xiàn)次數(shù)

      //編寫程序,統(tǒng)計出字符串“want you to know one thing”中字母N和字母O的出現(xiàn)次數(shù) class Count

      {

      private static int numN=0;

      private static int numO=0;

      private char c[];public Count(String info){} public void print(){} for(int i=0;i

      }

      public class Test03

      {

      public static void main(String args[])

      {

      Count cou=new Count(“want you to know one thing”);cou.print();

      }

      }

      第二篇:統(tǒng)計字符串中各元音字母(即A,E,I,O,U)的個數(shù)。

      下列給定函數(shù)中,函數(shù)fun的功能是:統(tǒng)計字符串中各元音字母(即A,E,I,O,U)的個數(shù)。注意:字母不分大小寫。例如,輸入THIs is a boot,則應(yīng)輸出是1 0 2 2 0。

      請改正程序中的錯誤,使它能得出正確的結(jié)果。

      注意:不要改動main函數(shù),不得增行或刪行,也不得更改程序的結(jié)構(gòu)。

      試題程序:

      #include

      #include

      #include

      /*************found**************/

      fun(char *s, int num[5])

      { int k, i=5;

      for(k=0;k

      /*************found**************/

      num[i]=0;

      for(;*s;s++)

      { i=-1;

      /*************found**************/

      switch(s)

      { case 'a': case'A':{i=0;break;}

      case 'e ': case 'E':{i=1;break;}

      case 'i': case 'I':{i=2;break;}

      case 'o': case 'O':{i=3;break;}

      case 'u': case 'U':{i=4;break;}

      }

      if(i>=0)

      num[i]++;

      }

      }

      void main()

      { char s1[81];int num1[5], i;

      system(“CLS”);

      printf(“nPlease enter a string: ”);

      gets(s1);

      fun(s1, num1);

      for(i=0;i<5;i++)printf(“%d ”,num1[i]);

      printf(“n”);

      }

      (1)錯誤:fun(char *s, int num[5])

      (2)錯誤:num[i]=0;

      (3)錯誤:switch(s)正確:void fun(char *s, int num[5])正確:num[k]=0;正確:switch(*s)

      下載編寫程序,統(tǒng)計出字符串“want you to know one thing”中字母N和字母O的出現(xiàn)次數(shù)word格式文檔
      下載編寫程序,統(tǒng)計出字符串“want you to know one thing”中字母N和字母O的出現(xiàn)次數(shù).doc
      將本文檔下載到自己電腦,方便修改和收藏,請勿使用迅雷等下載。
      點此處下載文檔

      文檔為doc格式


      聲明:本文內(nèi)容由互聯(lián)網(wǎng)用戶自發(fā)貢獻自行上傳,本網(wǎng)站不擁有所有權(quán),未作人工編輯處理,也不承擔(dān)相關(guān)法律責(zé)任。如果您發(fā)現(xiàn)有涉嫌版權(quán)的內(nèi)容,歡迎發(fā)送郵件至:645879355@qq.com 進行舉報,并提供相關(guān)證據(jù),工作人員會在5個工作日內(nèi)聯(lián)系你,一經(jīng)查實,本站將立刻刪除涉嫌侵權(quán)內(nèi)容。

      相關(guān)范文推薦