Even-after-odd ..here my code:https://ide.geeksforgeeks.org/2PdI0gLyMT

Please figure out where am i getting stuck in my code?
One test case is getting failed. WHY?