//乘法表 object Main { def main(args: Array[String]): Unit = { for (i <- 1 to 9; j <- 1 to i) { var sum = i * j print(s"${j} * $i = $sum \t") if (i == j) { println } } } }
Spark 99乘法表
最新推荐文章于 2024-03-13 15:11:44 发布
//乘法表 object Main { def main(args: Array[String]): Unit = { for (i <- 1 to 9; j <- 1 to i) { var sum = i * j print(s"${j} * $i = $sum \t") if (i == j) { println } } } }