#include <bits/stdc++.h>
using namespace std;

int main(){

    int a[] = {1,3,5,7,10,11,12,13};
    int start = 0;
    int end = sizeof(a)/sizeof(int) -1;
    int current_sum =0;
    int target = 16;

    while (start<end)
    {
        current_sum = a[start]+ a[end] ;
        if (current_sum <target)
        {
            start++;

        }
        else if (current_sum >target)
        {
            end--;
        }
        else if(current_sum == target){
            cout<<a[start]<<","<<a[end]<<endl;
            start++;
            end --;
        }

        
        
    }
    

}
{'avg_line_length': 17.914285714285715, 'max_line_length': 47, 'alphanum_fraction': 0.3939393939393939, 'licenses': ['Apache-2.0'], 'repository_name': 'ManthanChoudhury/100_days_coding', 'path': 'array_code/pair_sum_with_target.cpp', 'size': 627, 'lang': 'C++'}