I need the output for b = a[i] + a[j] if any part of the statement is true, to be a set of numbers ex: (2, 5) that add up to b and not spit out anything else. Then if no part of it is true, the output should be "not found." listed only once. I can't seem to figure out what I'm missing.
'''
#include<iostream>
using namespace std;
int main() {
int a[10];
int b;
int i = 0, j = 0;
bool pair;
cout<<"Enter 10 unique integers: ";
cin>>a[0]; cin>>a[1]; cin>>a[2]; cin>>a[3]; cin>>a[4]; cin>>a[5]; cin>>a[6]; cin>>a[7]; cin>>a[8]; cin>>a[9];
cout<<"Enter an integer: ";
cin>>b;
for (int i = 0; i < 10; i++){
for (int j = 0; j < 10; j++){
if (b==(a[i]+a[j]) && a[i] < a[j] && a[i] != a[j]){
pair = true;
cout<<"("<<a[i]<<", "<<a[j]<<")\n";
}
}
}
if (b!=a[i]+a[j]) {
pair = false;
cout<<"not found.\n";
}
return 0;
}
'''