HCLTech Interview Question

Even or odd program with some conditions