Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- import scala.Console._
- object Main {
- def read(echo: String = ""): Unit = {
- print(echo)
- readLine() match {
- case "42" => ()
- case s: String => read(echo=s + "\n")
- }
- }
- def main(args: Array[String]) = read()
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement