Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <stdio.h>
- int main(void)
- {
- int c;
- long num_upper, num_lower;
- num_upper = num_lower = 0;
- while((c = getchar()) != EOF)
- {
- if (c != ' ' & c != '\n' & c != '\t')
- {
- if ((c & 0x20) == 0)
- ++num_upper;
- else
- ++num_lower;
- }
- }
- printf("Number of upper-case letters: %ld\n", num_upper);
- printf("Number of lower-case letters: %ld\n", num_lower);
- return 0;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement