#include<stdio.h>
#include<string.h>
int check_element(int str[],int curent_number,int index,int size)
{
int counter = 0;
int sequence=1;
while(counter != size)
{
if(index == counter)
counter++;
if(counter != size)
{
if (curent_number == str[counter])
sequence++;
}
counter++;
}
return sequence;
}
int main(void)
{
int str[] = {2,1,3,4,5,6,1,66,66,96,7,77,28,22,1,29,1,90,98,1,92,1};
int temp = 0,size;
int i= 0;
int sequence = 1;
size = (sizeof(str) / sizeof(str[0]));
while(i != size )
{
sequence = check_element(str,str[i],i,size);
if(sequence != 1)
{
printf(" number %d with repeating of %d times ",str[i],sequence);
break;
}
else
{
i++;
}
}
getchar();
getchar();
return 0;
}