#3443: _???


nt207809game (賴皮)


#include<iostream>
using namespace std;

int main()
{
   string a;
   while(getline(cin, a))
   {
      int x=a.length();
      int y=1;
      for(int i=0;i<x;i++)
         if(a.substr(i,1)==" ")  y++;
      cout<<y<<endl;
   }
   return 0;
}

 這是錯在哪裡啊??

#3445: Re:???


linishan (L)


#include
using namespace std;

int main()
{
   string a;
   while(getline(cin, a))
   {
      int x=a.length();
      int y=1;
      for(int i=0;i         if(a.substr(i,1)==" ")  y++;
      cout<   }
   return 0;
}

 這是錯在哪裡啊??


字句不一定以空白做為間隔

只要不是AscII65~90 97~112(A~Z a~z)  都算˙˙