/ scala

Scala 002 - While

Loops until the user enters 0. The following example is a simple menu.

object hello {
	def main(args: Array[String]) {
    var a  = 0
    var input = ""
    println("\nStart")
    while(input != "0")
    {
      println("options\n0 = exit")
      input = readLine() 
    }
  }
}