#include<stdio.h>
int main()
{
int i, j, temp, arr[10];
printf(“Enter the number with some repeated number\n”);
for(i = 0; i < 10; i++)
{
scanf(“%d”,&arr[i]);
}
for(i = 0; i < 10; i++)
{
temp = arr[i];
for(j = 0; j < 10; j++)
{
if(i != j)
{
if(temp == arr[j])
{
printf(” Number %d is duplicate in array \n”,arr[j]);
}
}
}
}
return 0;
}
Output:
$ ./a.exe
Enter the number with some repeated number
1
1
4
4
2
3
5
6
7
8
Number 1 is duplicate in array
Number 1 is duplicate in array
Number 4 is duplicate in array
Number 4 is duplicate in array