Numbers filter

Report a typo

Create a thread with the name numbersFilter by using the function thread(). It should read integer numbers from the standard input (line by line). If the number is even, the filter must print it to the standard output (each number on a new line); if the number is 0, the filter must stop.

Sample Input 1:

1
2
3
4
0

Sample Output 1:

2
4
Write a program in Kotlin
fun main() {
val numbersFilter = thread(block = {
//write your code here
})
}
___

Create a free account to access the full topic