6 lines
196 B
Scala
6 lines
196 B
Scala
def multiFact(n : BigInt, degree : BigInt) = (n to 1 by -degree).product
|
|
|
|
for{
|
|
degree <- 1 to 5
|
|
str = (1 to 10).map(n => multiFact(n, degree)).mkString(" ")
|
|
} println(s"Degree $degree: $str")
|