void getsum(int nums[ ],int n ,int target ,int *a,int *b ) {int i=0,j=n-1;while(i<j){ if(nums[i] +nums[j]==target){ *a=i; *b=j ; return ;} else if(nums[i]+nums[j] > target){ j--; }else { i++;} }}