Question is ---- https://online.codingblocks.com/player/8634/content/4812?s=1622
#include
using namespace std;
int main() {
int n;
cin>>n;
int arr[n];
for(int i=0;i<n;i++){
cin>>arr[i];
}
int key;
cin>>key;
int pairSum=0;
for(int i=0;i<n;i++){
for(int j=i+1;j<n;j++){
pairSum=arr[i]+arr[j];
if(pairSum==key)
cout<<arr[i]<<" and "<<arr[j]<<endl;
}
}
return 0;
}
Can you please tell me where i am wrong as 2 testcases of mine are not correct?