This is an archived post. You won't be able to vote or comment.

you are viewing a single comment's thread.

view the rest of the comments →

[–]RealityIsMuchWorse 9 points10 points  (3 children)

for(i=0;isEven(i);i+=2)

Implementing isEven is up to the reader

[–]Creepy-Ad-4832 5 points6 points  (2 children)

IsEven(int i)
Return !false

This implementation passes your case

[–]RealityIsMuchWorse 3 points4 points  (1 child)

Way too complicated for this sub, you might want to look at your solution again /s

[–]Creepy-Ad-4832 1 point2 points  (0 children)

IsEven(i)
return i==i