Untitled

Anonymous
plain_text
08/01/2023 5:32 AM
612 B
28
Indexable
You are given an array A of size n and an integer b.  You have to find outall pairs of elements from array A whose sum is equal to b and print them.  Inthe first line, you are given 2 integers, n (size of array) and b.  In the next line,you are given n integers (the elements of array A). You have to output all pairsof elements from array A whose sum is equal to b.  Output each new pair in anew line.Example:Input:5 5 where n = 5 b = 51 2 3 4 5Output1 42 3
Editor is loading...