Sep-30-2019, 12:52 PM
(This post was last modified: Sep-30-2019, 12:53 PM by Shadowlord.)
Seems the mistake is not my code which works, but that it should have been x/2 as you said for even in your post. It was of course repeating the first even number it came across in my version. Oops! I've changed return x to return x/2 and it works fine.