Cargomatic Interview Question

given a sorted array, print the elements whose sum is equal to n.