1 of 4

Scala 412 376:

object P extends Application{
def p(t:List[String],u:List[Double]):Double=t match{
case Nil=>u.head
case x::y=>x match{
case "+"=>p(y,(u(1)+u(0))::u.tail.tail)
case "-"=>p(y,(u(1)-u(0))::u.tail.tail)
case "*"=>p(y,(u(1)*u(0))::u.tail.tail)
case "/"=>p(y,(u(1)/u(0))::u.tail.tail)
case (d)=>p(y,d.toDouble::u)}}
println (p((readLine().split(" ")).toList,List():List[Double]))}