View Problem

Perform different actions depending on several boolean conditions (IF .. THEN .. ELSIF .. ELSE)

ExpandDiskEdit
scala
val age = 65

if (age > 84) println("You are really ancient")
else if (age > 30) println("You are middle-aged")
else println("You are young")

Submit a new solution for scala
There are 21 other solutions in additional languages (clojure, cpp, csharp, erlang ...)