#include
using namespace std;
int main() {
int arr[] = {1,3,5,7,10,11,12,13};
int i=0;
int key = 16;
int j= sizeof(arr)/sizeof(int) - 1;
while(i<j){
int csum=arr[i] + arr[j];
if(csum>key){
j–;
}else if(csum<key){
i++;
}else if(csum==key){
cout<< arr[i] << ‘and’ << arr[j];
i++;
j–;
}
}
}