Even-after-odd question


I am getting run error in one of the test cases. Help me find out the mistake in my code.

The code you have written is not working correctly for following types of test cases, as
Input :
5
1 3 5 7 9
Expected Output : 1 3 5 7 9
Your output : Runtime error

Try to change your code according to this test case…