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