Sir, for the problem target sum pair in the array challenge section one test case is not passing?Problem.
My code:-
#include
using namespace std;
int main(){
int a[999];
int n;
cin>>n;
for(int i=0;i<=n-1;i++){
cin>>a[i];
}
int ta;
cin>>ta;
for(int i=0;i<n;i++){
for(int j=1;j<n;j++){
if(a[i]+a[j]==ta && a[i]<=a[j]){
cout<<a[i]<<" “<<“and”<<” "<<a[j]<<endl;
}
}
}
}