Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include<stdio.h>
- int main()
- {
- int i,j,n,alphabet=0,capital=0,small=0;
- scanf("%d",&n);
- for(i=0 ;i<n ; i++)
- {
- char ibr[400];
- scanf(" %[^\n]",ibr);
- for(j=0 ;j<strlen(ibr); j++)
- {
- if(ibr[j]>='A' && ibr[j]<='Z' || ibr[j]>='a' && ibr[j]<='z')
- {
- alphabet++;
- if(ibr[j]>='a') small++;
- else capital++;
- }
- }
- printf("Alphabet :%d\n ",alphabet);
- printf("Capital :%d\n",capital);
- printf("Small:%d\n",small);
- alphabet=0,capital=0,small=0;
- }
- return 0;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement