//Find the Number Occurring Odd Number of Times
#include <stdio.h>
#include <math.h>
void main()
{
int a=0,count=0;
printf("ENTER RANGE OF AN ARRAY = \n");
scanf("%d",&a);
int arr[a];
printf("ENTER YOUR ARRAY =\n");
for(int i=0;i<a;i++){
scanf("%d",&arr[i]);
}
for(int i=0;i<a;i++){
count=1;
for(int j=i+1;j<a;j++)
{
if(arr[i]==arr[j])
count++;
}
// printf("%d %d ka COUNT= %d\n",i,arr[i],count);
if(count%2>0&&count>1)
{
printf("THE NUMBER OCCURED ODD NUMBER OF TIMES ARE = %d\t%d\n",arr[i],count);
}
}
}
To embed this project on your website, copy the following code and paste it into your website's HTML: