Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <stdio.h>
- int main()
- {
- int size = 8;
- int i,j,n = 0;
- int arr[] = {10,10,10,10,12 ,12 ,13,10};
- for(i = 0; i < size; i++ )
- {
- for(j = i+1; j < size;j++)
- {
- if(arr[i] == arr[j])
- {
- n++;
- break;
- }
- }
- }
- printf("The no. of duplicates are %d",n );
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement