Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include<stdio.h>
- #include<string.h>
- #include<ctype.h>
- int main(){
- char s[500];
- gets(s);
- int count1=0,count2=0,count3=0;
- for(int i=0;i<strlen(s);i++){
- if(isalpha(s[i])) count1++;
- else if(isdigit(s[i])) count2++;
- else count3++;
- }
- printf("%d %d %d",count1,count2,count3);
- }
Add Comment
Please, Sign In to add comment