Advertisement
Guest User

Untitled

a guest
Jan 25th, 2015
211
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Scala 0.21 KB | None | 0 0
  1. while(true){
  2.     val readLine = scala.io.StdIn.readLine()
  3.     // Quit the calculator if q or quit were entered
  4.     if(readLine == "q" || readLine == "quit")
  5.         return
  6.     else
  7.         println(evaluateExpression(readLine))
  8. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement