Write a program that reads 3 words separated by spaces and separates them with commas. Remember that the readLine function reads the line up to the first Enter.
Input/Output
Simple parsing
Report a typo
Sample Input 1:
Hello my friendsSample Output 1:
Hello, my, friendsWrite a program in Scala 3
import scala.io.StdIn.readLine
@main def program =
// write your code here
___
By continuing, you agree to the JetBrains Academy Terms of Service as well as Hyperskill Terms of Service and Privacy Policy.
Create a free account to access the full topic
By continuing, you agree to the JetBrains Academy Terms of Service as well as Hyperskill Terms of Service and Privacy Policy.