Coming of age

Report a typo

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")
Select one option from the list
___

Create a free account to access the full topic