/ scala

Scala 003 reverse string

Quick Solution

stringVariable.reverse

My solution

object reverseString {
  def main(args: Array[String]) {
    println("Reverse String")
    var input = ""

    while (input != "q")  {
      input = readLine("Please enter a string> ")
      println("\nOriginal\n"+ input)
      println("\nReversed\n"+ input.reverse)
    }
  }
}