Arrays- target sum pairs

Take as input N, the size of array. Take N more inputs and store that in an array. Take as input “target”, a number. Write a function which prints all pairs of numbers which sum to target.

Input Format
The first line contains input N. Next N lines contains the elements of array and (N+1)th line contains target number.

solution link: https://ide.codingblocks.com/s/260335

one test case is not passing.

in the while loop instead of i<=j, i < j would come.