RosettaCodeData/Task/Compile-time-calculation/Scala/compile-time-calculation-2.scala

8 lines
174 B
Scala
Raw Permalink Normal View History

2023-07-01 11:58:00 -04:00
object Main extends {
val tenFactorial = 10 * 9 * 8 * 7 * 6 * 5 * 4 * 3 * 2
def tenFac = 10 * 9 * 8 * 7 * 6 * 5 * 4 * 3 * 2
println(s"10! = $tenFactorial", tenFac)
}