Here in this program we take input from the user and then we scan the given input .If a number is present odd number of times then we find the product of that particular number with number of times its occuring. In this program if i give an input as 1 1 2 2 3 3 3 then in this case the output must be 9 but i'm getting it 999.
#include <stdio.h>
int main()
{
int data[10],i,j,sum,count=0,num;
for(i=0;i<7;i++)
{
scanf("%d",&data[i]);
}
for(i=0;i<7;i++)
{
num=data[i];
for(j=0;j<7;j++)
{
if(num==data[j])
{
count++;
}
}
if((count%2)!=0)
{
printf("%d",num*count );
}
count=0;
}
}