Space problem in the output

why am i getting the space behind 1

@bhavyajain hey bhavya save the code on ide and share it here so that we can help you asap

@bhavyajain hey bhavya i saw your code through code pair feature i suggest you to sort the array first then apply two loop first loop from i =0 to n and for j=i+1to n
if (a[i]+a[j]==target)
cout<<a[i]<<" "<<a[j];

Hey Bhavya,
As you are not responding to this thread, I am marking your doubt as Resolved for now. Re-open it if required.

Please mark your doubts as resolved in your course’s “ Ask Doubt ” section, when your doubt is resolved.