Skip to content

Instantly share code, notes, and snippets.

@klaeufer
Created March 10, 2015 18:28
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save klaeufer/3e559ee8191d4c7a752d to your computer and use it in GitHub Desktop.
Save klaeufer/3e559ee8191d4c7a752d to your computer and use it in GitHub Desktop.
val lines = scala.io.Source.stdin.getLines
var count = 0
for (l <- lines) {
println(l)
count += 1
}
println("count = " + count)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment