I have done the even odd program using recursion using the above concept but it is only passing one test case

Here is my program