Pages

Wednesday, July 27, 2011

a011. 幼稚園的算數遊戲


/*
程式碼長度: 606 Bytes
執行檔大小: 10341 Bytes
*/

#include
using namespace std;
#include

int main()
{
string str1;
int n=0;
int firstch=1;
while(getline(cin,str1))
{
for(int i=0; i<=str1.length(); i++)
{
if(isalpha(str1[i])!=0)
{
if(firstch==1)
{
n++;
}
firstch=0;
}
else
{
firstch=1;
}
}
cout< n=0;
}

system("pause");
return 0;
}

No comments:

Post a Comment