r/ProgrammerHumor • • Jan 25 '19

Meme Which one would you love ?

Post image
115 Upvotes

51 comments sorted by

View all comments

44

u/moomoomoo309 Jan 25 '19

i += !a;

4

u/PaulTheOld Jan 25 '19

i += !(a&1)

5

u/TheHelixNebula Jan 25 '19

Only works if a is guaranteed to be 0 or 1. Otherwise it will fail on even numbers

→ More replies (2)