HCLTech interview question

Even or odd program with some conditions