What will this program output if we input Kate 15?
import scala.io.StdIn._
@main def run =
val name = readLine("Enter your name: ")
val age = readLine("Enter your age: ")
print(if age < 18 then s"Hi, $name" else s"Hello, $name")What will this program output if we input Kate 15?
import scala.io.StdIn._
@main def run =
val name = readLine("Enter your name: ")
val age = readLine("Enter your age: ")
print(if age < 18 then s"Hi, $name" else s"Hello, $name")Create a free account to access the full topic