You need to copy the lines from one file to another. In the input, you get the names of the original file and of its copy.
Given the following code:
val scanner = Scanner({ 1 })
val inputName = scanner.nextLine()
val outputName = scanner.nextLine()
File(outputName).{ 2 }.{ 3 }
{
for (line in File(inputName).readLines()) {
if (line.{ 4 }) {
it.{ 5 }(line)
}
it.newLine()
}
}
Please match the numbers and the missing parts of the code.