#include using namespace std; bool hasArrayTwoCandidates(int A[], int N, int s) { int l, r; // Sorting the array sort(A, A + N); l = 0; r = N-1; while (l < r) { if(A[l] + A[r] == s) { cout<<"The suitable pair is ("<>N; cout<<"Enter the elements of array: "<>A[i]; cout<<"Enter the value of sum to be find: "; cin>>s; if (!hasArrayTwoCandidates(A, N, s)) cout << "No such pair present in the array whose sum is equal to entered sum"; return 0; }