Re: A quiz...

From: Dong-Young CHAE (dychae@blue.bluewave.co.kr)
Date: 06/11/96


x -= x % 2;

I think.

> 
> I just came up with this and wanted to see if anyone else could figure it
> out.
> 
> Without using an if statement or the: x == 5 ? "yes" : "no" format (I forget
> it's technical name) can you do the following (and in the least amount of
> code too)
> 
> make a function/command/macro/whatever that will take a number and reduce it
> down to the next even number (IE if it's 12, it returns/gives 12, if it's
> 13, it gives/returns 12)
> 
> Remember, no if statements, and in least possible code...
> 
> Doh I just though of anohter solution which would be even easier than the
> first one I came up with... dunno if it'd work tho will have to test it out.
> :)
> 
> Hades the master of innane questions and dumb shit at wee hours of the
> morning.
> 


-- 
----------------------------------------------------------------------------
% id                                  | E-Mail: dychae@blue.bluewave.co.kr
uid=0(cronos) gid=1(cronos)           |         cronos@cronos.bluewave.co.kr
% whoami                              |
who are you?                          | Phone:  051-610-0941, 051-610-0942
% shit!                               |         Bluewave Communications.
Connection closed by foreign host.    |
----------------------------------------------------------------------------



This archive was generated by hypermail 2b30 : 12/18/00 PST