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