Function to find and print pair
bool chkPair ( int A [ ] , int size , int x ) { for ( int i = 0 ; i < ( size - 1 ) ; i ++ ) { for ( int j = ( i + 1 ) ; j < size ; j ++ ) { if ( A [ i ] + A [ j ] == x ) { cout << " Pair ▁ with ▁ a ▁ given ▁ sum ▁ " << x << " ▁ is ▁ ( " << A [ i ] << " , ▁ " << A [ j ] << " ) " << endl ; return 1 ; } } } return 0 ; }