Scala immutable variables and printing
问题 Currently taking a class that's using Scala which I've never used before, so the syntax and itself is new. I'm working on a simple division function but am running into some errors. First of all, am I using var sub=m right? In my code I simply wanted to do m = m-n but you can't change the variable, and I'm not sure what the best alternative is. Then my only other problem is the compiler barks at me for my print line.. <console>:14: error: reassignment to val m = m-n //////////////////////////