In Google Code Jam 2009, Round 1B, there is a problem called Decision Tree that lent itself to rather creative solutions.
Post your shortest solution; I'll update the Accepted Answer to the current shortest entry on a semi-frequent basis, assuming you didn't just create a new language just to solve this problem. :-P
Current rankings:
- 107 Perl
- 121 PostScript (binary)
- 132 Ruby
- 154 Arc
- 160 PostScript (ASCII85)
- 170 PostScript
- 192 Python
- 196 JavaScript
- 199 Common Lisp
- 212 LilyPond
- 273 Scheme
- 280 R
- 281 sed w/ bc
- 312 Haskell
- 314 PHP
- 339 m4 w/ bc
- 346 C
- 381 Fortran
- 462 Java
- 718 OCaml
- 759 F#
- 1554 sed
- C++ not qualified for now