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