Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include<stdio.h>
- #include<string.h>
- int main()
- {
- int a,i;
- char s[1020];
- while(gets(s))
- {
- a=0;
- for(i=0; s[i]!='\0'; i++)
- {
- if((s[i]>'A'&&s[i]<'Z')||(s[i]>'a'&&s[i]<'z'))
- {
- a++;
- ///printf("%c",s[i]);
- for(i++; (s[i]>'A'&&s[i]<'Z')||(s[i]>'a'&&s[i]<'z'); i++);
- i--;
- }
- }
- printf("%d\n",a);
- }
- return 0;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement