include< iostream >
include < bits/stdc++.h >
using namespace std;
int main() {
int n = 0, target = 0,cs = 0;
cin >> n;
int a[n] = {0};
for(int h = 0; h<n;h++){
cin>>a[h];
}
int k = sizeof(a)/sizeof(a[0]);
sort(a, a+k);
int i = 0;
int j = sizeof(a)/sizeof(int) - 1;
cin >> target;
while(i < j){
int cs = a[i] + a[j];
if(cs > target){
j–;
}
else if(cs < target){
i++;
}
else if(cs == target){
cout << a[i] << “and” << a[j] << endl;
i++;
j–;
}
}
return 0;
}
my code is right but in your CB compiler target sum-pair challenge i got error compile error
Please help me