Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include<stdio.h>
- #include <ctype.h>
- #include <string.h>
- int main()
- {
- int i,upper=0,lower=0;
- char str[100];
- printf("Enter the String:\n");
- gets(str);
- for(i=0; str[i]!=0; i++)
- {
- if(str[i]>='A' && str[i]<='Z')
- {
- upper++;
- }
- else if(str[i]>='a' && str[i]<='z')
- {
- lower++;
- }
- }
- printf("The Lowercase Letters are: %d\n",lower);
- printf("The Uppercase Letters are: %d\n",upper);
- return 0;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement