Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include<stdio.h>
- int main()
- {
- int a,b,c,d,e,f,g,h,i,j,k,l,m,n,o,p,q,r,s,t,u,v,w,x,y,z;
- a=b=c=d=e=f=g=h=i=j=k=l=m=n=o=p=q=r=s=t=u=v=w=x=y=z=0;
- char ch = '1';
- while(ch!='\n') //This Will Count The Number of Letters Individually
- {
- ch = getchar();
- if(ch=='a' || ch=='A')
- a++;
- else if(ch=='b' || ch=='B')
- b++;
- else if(ch=='c' || ch=='C')
- c++;
- else if(ch=='d' || ch=='D')
- d++;
- else if(ch=='e' || ch=='E')
- e++;
- else if(ch=='f' || ch=='F')
- f++;
- else if(ch=='g' || ch=='G')
- g++;
- else if(ch=='h' || ch=='H')
- h++;
- else if(ch=='i' || ch=='I')
- i++;
- else if(ch=='j' || ch=='J')
- j++;
- else if(ch=='k' || ch=='K')
- k++;
- else if(ch=='l' || ch=='L')
- l++;
- else if(ch=='m' || ch=='M')
- m++;
- else if(ch=='n' || ch=='N')
- n++;
- else if(ch=='o' || ch=='O')
- o++;
- else if(ch=='p' || ch=='P')
- p++;
- else if(ch=='q' || ch=='Q')
- q++;
- else if(ch=='r' || ch=='R')
- r++;
- else if(ch=='s' || ch=='S')
- s++;
- else if(ch=='t' || ch=='T')
- t++;
- else if(ch=='u' || ch=='U')
- u++;
- else if(ch=='v' || ch=='V')
- v++;
- else if(ch=='w' || ch=='W')
- w++;
- else if(ch=='x' || ch=='X')
- x++;
- else if(ch=='y' || ch=='Y')
- y++;
- else if(ch=='z' || ch=='Z')
- z++;
- }
- if(a>1)
- printf("%d A(s)\n",a);
- if(b>1)
- printf("%d B(s)\n",b);
- if(c>1)
- printf("%d C(s)\n",c);
- if(d>1)
- printf("%d D(s)\n",d);
- if(e>1)
- printf("%d E(s)\n",e);
- if(f>1)
- printf("%d F(s)\n",f);
- if(g>1)
- printf("%d G(s)\n",g);
- if(h>1)
- printf("%d H(s)\n",h);
- if(i>1)
- printf("%d I(s)\n",i);
- if(j>1)
- printf("%d J(s)\n",j);
- if(k>1)
- printf("%d K(s)\n",k);
- if(l>1)
- printf("%d L(s)\n",l);
- if(m>1)
- printf("%d M(s)\n",m);
- if(n>1)
- printf("%d N(s)\n",n);
- if(o>1)
- printf("%d O(s)\n",o);
- if(p>1)
- printf("%d P(s)\n",p);
- if(q>1)
- printf("%d Q(s)\n",q);
- if(r>1)
- printf("%d R(s)\n",r);
- if(s>1)
- printf("%d S(s)\n",s);
- if(t>1)
- printf("%d T(s)\n",t);
- if(u>1)
- printf("%d U(s)\n",u);
- if(v>1)
- printf("%d V(s)\n",v);
- if(w>1)
- printf("%d W(s)\n",w);
- if(x>1)
- printf("%d X(s)\n",x);
- if(y>1)
- printf("%d Y(s)\n",y);
- if(z>1)
- printf("%d Z(s)\n",z);
- return 0;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement