object HelloWorld {
def main(args: Array[String]): Unit = {
for (i <- 1 to 9) {
for (j <- 1 to i){
print(j+"*"+i+"="+i*j+"\t")
}
println()
}
}
}
Scala实现乘法表
最新推荐文章于 2024-09-19 16:58:44 发布
object HelloWorld {
def main(args: Array[String]): Unit = {
for (i <- 1 to 9) {
for (j <- 1 to i){
print(j+"*"+i+"="+i*j+"\t")
}
println()
}
}
}