The program must accept N integers and an integer K as the input. The program must print yes if the sum of any two integers among the N integers is equal to K. Else the program must print no as the output.
Example Input/Output 1:
Input:
5 10
2 5 8 4 7
Output:
yes
Explanation:
The sum of 2 and 8 is 10. So yes is printed.
C++ :

Leave a Reply