Capgemini Interview Question

Logic to print prime nunbers