News for hackers. Stuff that matters.
Re:Calculate n + 1 without using + or - or * or / by bobwebb on Saturday July 02, 2011 @06:30PM (#2722582)
def add_1(x): return sum([1,x])

Python.

Too simple? I didn't use any of the signs, and it demonstrates knowledge of the python standard library!

EDIT: Whoops, seems the idea of using the sum() function (or operator) has been dismissed elsewhere. Time to study some more languages, I think.

There are no comments on this comment yet.