#include <stdio.h>
#include <math.h>
#include <string.h>
#include <stdlib.h>
int main(void)
{
char input[10000];
int m_length;
int i,index;
int state;
while(gets(input)!=NULL)
{
index = 0;
state = 0;
m_length = strlen(input);
for(i=0;i<=m_length;i++)
{
if((input[i]>='A' && input[i]<='Z') || (input[i]>='a' && input[i]<='z'))
state = 1;
else
if(state)
{
index++;
state = 0;
}
}
printf("%d\n",index);
}
return 0;
}
沒有留言:
張貼留言