RosettaCodeData/Task/Conditional-structures/Scala/conditional-structures.scala
2023-07-01 13:44:08 -04:00

11 lines
223 B
Scala

if (n == 12) "twelve" else "not twelve"
today match {
case Monday =>
Compute_Starting_Balance;
case Friday =>
Compute_Ending_Balance;
case Tuesday =>
Accumulate_Sales
case _ => {}
}