Sunday, March 27, 2005

"We don't want to continue the curse: if you break 3 balloons, you get hemerroids." - my Father while putting up birthday balloons this evening. Something I read recently was the following:
What is the simplest code to do the following: assume that a number i given is either 1 or 2. If the number is 2, change it to 1, and if the number is 1, change it to 2. [Answer] i = 3 - 1

1 comment:

Rob said...

Ed, do you mean
i = 3 - i;