If found , print the pair .
if ( binary_search ( arr , arr + n , - arr [ i ] ) ) { cout << arr [ i ] << " , ▁ " << - arr [ i ] << endl ; pair_exists = true ; } } else break ; } if ( pair_exists == false ) cout << " No ▁ such ▁ pair ▁ exists " ; }