Input/Output for lines of text: Difference between revisions

Scala contribution added.
No edit summary
(Scala contribution added.)
Line 627:
end</lang>
 
=={{header|Scala}}==
<lang Scala>// Input/Output for Lines of Text
object IOLines extends App {
private val in = scala.io.StdIn
private val n = in.readInt()
 
private def doStuff(word: String): Unit = println(word)
 
for (_ <- 0 until n) {
val word = in.readLine()
doStuff(word)
}
}</lang>
=={{header|Tcl}}==
<lang tcl>proc do_stuff {line} {
Anonymous user