Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <stdio.h>
- int main() {
- char c;
- unsigned uppercaseChars = 0;
- unsigned lowecaseChars = 0;
- unsigned digits = 0;
- while(scanf("%c", &c) != EOF) {
- if(c > 'a' && c <= 'z') {
- lowecaseChars++;
- } else if(c > 'A' && c < 'Z') {
- uppercaseChars++;
- } else {
- digits++;
- }
- }
- printf("%u %u %u", lowecaseChars, uppercaseChars, digits);
- return 0;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement