Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include<stdio.h>
- int main()
- {
- int n, a[10]={0}, t , i;
- printf("Enter The Number: ");
- scanf("%d",&n);
- for(t=n ; t!=0 ; t/=10)
- for(i=0 ; i<10 ; i++)
- if(t%10==i)
- a[i]++;
- for(i=0 ; i<10 ; i++)
- if(a[i]>1)
- printf("%d: %d times\n",i,a[i]);
- return 0;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement