UVa 494 - Kindergarten Counting Game

#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);
    }
}
Share on Google Plus

About Unknown

This is a short description in the author block about the author. You edit it by entering text in the "Biographical Info" field in the user admin panel.
    Blogger Comment
    Facebook Comment

0 মন্তব্য(গুলি):

একটি মন্তব্য পোস্ট করুন