Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <stdio.h>
- int main()
- {
- int a[10],i,j,count=0;
- for (i=0;i<10;i++)
- {
- scanf("%d", &a[i]);
- }
- for (i=0;i<10;i++)
- {
- for(j=i+1;j<10;j++)
- {
- if(a[i]==a[j])
- {
- count++;
- break;
- }
- }
- }
- printf("Total number of duplicate elements=%d", count);
- return 0;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement