//===================================================================
/*
*The function finds the sum of adjacent numbers, if the number is equal to X, displays them on screen.
* iEqualTo - Number which must be equal to the number of adjacent
*/
//===================================================================
void NeighborsAmountTwenty(int *iArray, int iArraySize, int iEqualTo)
{
for(int i = 0; i < iArraySize; i += 2)
{
if((*(iArray+i) + *(iArray+(i+1))) == iEqualTo && i+1 < iArraySize)
{
std::cout<<"The sum of numbers from an array "<<*(iArray+i)<<" and "
<<*(iArray+(i+1))<<" = "<<*(iArray+i) + *(iArray+(i+1))<<std::endl;
std::cout<<std::endl;
}
}
}