Cognizant Interview Question

Print every nth number in an array