Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <stdio.h>
- #include <ctype.h>
- #define SIZE 100
- int main()
- {
- char wish[SIZE]="#B3stofLuCK!";
- int x, digit=0, lower=0, upper=0, other=0;
- for(x=0; x < strlen(wish); x++)
- {
- if(isdigit(wish[x]))
- digit++;
- else if(islower(wish[x]))
- lower++;
- else if(isupper(wish[x]))
- upper++;
- else
- other++;
- }
- printf("No. of digits : %d\n", digit);
- printf("No. of lowercase letters : %d\n", lower);
- printf("No. of uppercase letters : %d\n", upper);
- printf("No. of other characters : %d\n", other);
- system("pause");
- return 0;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement