If we find a pair , then print the pair and return . The first condition makes sure that two same values are not added
if ( ( val1 != val2 ) && ( val1 + val2 ) == target ) { cout << " Pair ▁ Found : ▁ " << val1 << " + ▁ " << val2 << " ▁ = ▁ " << target << endl ; return true ; }