From 5cdbb44a8643e538e146f6dedf540396675e0273 Mon Sep 17 00:00:00 2001 From: Lyxnx Date: Tue, 9 Oct 2018 11:23:22 +0100 Subject: [PATCH] Solution for scala --- scala/42.scala | 10 ++++++++++ 1 file changed, 10 insertions(+) create mode 100644 scala/42.scala diff --git a/scala/42.scala b/scala/42.scala new file mode 100644 index 0000000..9092cce --- /dev/null +++ b/scala/42.scala @@ -0,0 +1,10 @@ +object Forty2 { + + def main(args: Array[String]): Unit = { + while (true) { + var x = StdIn.readInt() + println(x) + if (x == 42) return + } + } +} \ No newline at end of file