Your mistake in the case (n%2!=0) is because you invert the CreateOdd and CreateEven function.
I think your code should be :
because when you have an odd number of elements, you will have 1 more element at an odd position.
F[1,2,3,4,5] = F[1,3,5] + F[2,4] : 3 elements in odd and only 2 in even
You can simplify your code with :
The second mistake must be to use "global" variables (even and odd array) in a recursive function. I do not see in your code sample any declarations for even and odd.
And my last remark, will be in C++ the arrays usually start at index 0: