ログイン
編集不可のページディスカッション情報添付ファイル

検索条件 "linkto:"rei05/C言語/10022"" に対して、結果は0件でした。条件を変更するか、 HelpOnSearching を参照してください。
(!) 次のことを検討してください 同じ検索語で全文検索を行う.

メッセージを消す
rei05/C言語/10022

MMA

   1 #include<stdio.h>
   2 #include<ctype.h>
   3 #include<string.h>
   4 int main(){
   5 
   6 int counter=0,i;
   7 char word[1000],sen[1000];
   8 
   9 scanf("%s",word);
  10 while(1){
  11   scanf("%s",sen);
  12     if(strcmp(sen,"END_OF_TEXT")==0) break;
  13   for(i=0;sen[i]!='\0';i++){
  14     sen[i]=tolower(sen[i]);
  15   }
  16   if(strcmp(sen,word)==0) counter++;
  17 }
  18 
  19 printf("%d\n",counter);
  20 
  21 return(0);
  22 }