Scala if statement

Conditional statement

if (a>1)
   print("a is greater than 1")
else if (a==1)
   print("a is equal to 1")
else
   print("a is less than 1")

Last updated