for (i <- 1 to 10) { print(i) if (i % 5 == 0) println() else print(", ") }