Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include<stdio.h>
- #include<string.h>
- int main()
- { int j,n,i,cnt[27],t,sum=0;
- for(i=0;i<27;i++)
- {
- cnt[i]=0;
- }
- char str[1001];
- scanf(" %[^\n]",str);
- for(j=0;str[j]!='\0';j++)
- {
- if(str[j]>='a' && str[j]<='z')
- cnt[str[j]-'a']=1;
- }
- for(i=0;i<26;i++)
- {
- sum=cnt[i]+sum;
- }
- printf("%d\n",sum);
- return 0;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement