to execute the .scala file. open up cmd and locate to the scala file. then type "scalac tutorial3.scala" and hit enter then type as follows:
it you want to execute the code for question 1 then type "scala tutorial3 q1" and hit enter.
edit the "q1" part as your need e.g: if you want question 5 then instead of "q1", put "q5" there and hit enter.