if (n%2 == 0)
return 1; n+test(n%2);
else
return 0; n+test(n%2);
I haven't tried ur code, but if im not mistaken, if u write return, wouldn't the program got out of the if before it can even do the n+test?
And also, i haven't tried it, but 2 statements that are written in one line are considered 2 statements after all right?
Maybe u should use braces, just for precaution
And btw, if u could maybe post the error message so we can figure whats wrong?
Hope this helps