RosettaCodeData/Task/Nested-function/Scala/nested-function.scala

12 lines
223 B
Scala
Raw Permalink Normal View History

2023-07-01 11:58:00 -04:00
def main(args: Array[String]) {
val sep: String=". "
var c:Int=1;
def go(s: String):Unit={
println(c+sep+s)
c=c+1
}
go("first")
go("second")
go("third")
}