RosettaCodeData/Task/Conditional-structures/Scala/conditional-structures.scala

12 lines
223 B
Scala
Raw Permalink Normal View History

2015-02-20 00:35:01 -05:00
if (n == 12) "twelve" else "not twelve"
today match {
case Monday =>
Compute_Starting_Balance;
case Friday =>
Compute_Ending_Balance;
case Tuesday =>
Accumulate_Sales
case _ => {}
}