Cognizant Interview Question

Print all even numbers from 1 to 10.