Advertisement
Falak_Ahmed_Shakib

shashing

Jul 9th, 2019
137
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.36 KB | None | 0 0
  1. #include<stdio.h>
  2. #include<string.h>
  3. int main()
  4.  
  5. { int j,n,i,cnt[27],t,sum=0;
  6.  
  7. for(i=0;i<27;i++)
  8. {
  9. cnt[i]=0;
  10. }
  11. char str[1001];
  12. scanf(" %[^\n]",str);
  13. for(j=0;str[j]!='\0';j++)
  14. {
  15. if(str[j]>='a' && str[j]<='z')
  16.  
  17. cnt[str[j]-'a']=1;
  18. }
  19. for(i=0;i<26;i++)
  20. {
  21. sum=cnt[i]+sum;
  22. }
  23.  
  24. printf("%d\n",sum);
  25. return 0;
  26. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement