Saleh127

Untitled

Apr 11th, 2020
83
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.38 KB | None | 0 0
  1. #include <stdio.h>
  2. int main()
  3. {
  4. char a[1000];
  5. int b=0,c=0,d=0,e,f;
  6. scanf("%[^\n]%*c",a);
  7. for(int i=0;a[i]!='\0';i++)
  8. {
  9. if(a[i]>='A' && a[i]<='Z') b++;
  10. else if(a[i]>='a' && a[i]<='z') c++;
  11. else if(a[i]==' ') d++;
  12. }
  13. printf("Capital: %d\n",b);
  14. printf("Small: %d\n",c);
  15. printf("Space: %d\n",d);
  16. return 0;
  17. }
Add Comment
Please, Sign In to add comment