/*To find how many smilar numbers in array and which is it and
To find sum of numbers in array by using functions*/
#include<iostream>
int findsmilarnumbers ( int number[], int count )
{
int result = 0;
for ( int i=0; i<count; i++ )
{
for ( int j=0; j<count; j++ )
{
if (numbers[i] == numbers[i]&& ( i != j ))
{
result ++;
}
}
return result;
}
int sum ( int numbers[], int count )
{
int result = 0;
for ( int i=0; i<count; i++ )
{
result = numbers[i];
}
return result;
}
void man()
}
int main ()
{
int a[4] = {1,2,2,3};
int count = 4;
int smilarnumber = findsmilarnumbers( a, count );
int sum = sum( a, count );
cout <<" smilar numbers count "<< smilarnumber;
cout <<" sum of numbers "<< sum;
return 0;
}