Control Structure and Functions in Scala
Conditional Statements
if x > 0 then 1 else -1
val s = if x > 0 then 1 else -1
var t = 0
if x > 0 then t = 1 else -1
Input and Output
We can read a line of input from the console with the readLine method of the scala.io.StdIn class. To read a...
diwashmainali.hashnode.dev3 min read