Now you are working with a sequence of numbers. Your job is to multiply an odd number by 2 and to add 10 to an even number.
You have two methods that help you perform these operations:
fun multiplyByTwo(number: Int): Int {
return number * 2
}
fun addTen(number: Int): Int {
return number + 10
}
Write a program that reads numbers and performs certain actions depending on the parity of the number.
You are given the sequence of numbers itself separated by a space.