Advertisement
Guest User

Untitled

a guest
Feb 20th, 2020
81
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.45 KB | None | 0 0
  1. #include <stdio.h>
  2.  
  3. int main() {
  4. char c;
  5. unsigned uppercaseChars = 0;
  6. unsigned lowecaseChars = 0;
  7. unsigned digits = 0;
  8.  
  9. while(scanf("%c", &c) != EOF) {
  10. if(c > 'a' && c <= 'z') {
  11. lowecaseChars++;
  12. } else if(c > 'A' && c < 'Z') {
  13. uppercaseChars++;
  14. } else {
  15. digits++;
  16. }
  17. }
  18. printf("%u %u %u", lowecaseChars, uppercaseChars, digits);
  19. return 0;
  20. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement