Advertisement
Md_hosen_zisad

alp,cap,samcount

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