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

8 lines
174 B
Scala

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)
}