Question d’entretien chez Cargomatic

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