Advertisement
Md_hosen_zisad

alp,cap,sma,perform

Oct 18th, 2017
354
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.57 KB | None | 0 0
  1. #include<stdio.h>
  2. #include<string.h>
  3. int main()
  4. {
  5. int c,j,i,alp=0,cap=0,sma=0;
  6. int n;
  7. scanf("%d",&n);
  8. c=getchar();
  9. for(i=0;i<n;i++)
  10. {
  11. char str[100];
  12. scanf(" %[^\n]",str);
  13. for(j=0;j<strlen(str);j++)
  14. {
  15.  
  16.  
  17. if(str[j]>='A' && str[j]<='Z' || str[j]>='a' && str[j]<='z')
  18. {
  19.  
  20. alp++;
  21. if(str[j]>='a')
  22. sma++;
  23. else
  24. cap++;}
  25.  
  26. }
  27.  
  28.  
  29. printf("alp %d\n",alp);
  30. printf("sma %d \n",sma);
  31. printf("cap %d \n",cap);
  32. alp=0;cap=0;sma=0;}
  33. return 0;
  34.  
  35.  
  36. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement