Bizzare things

Report a typo

You are trying to encrypt two words by creating their combination, letter by letter. When you run out of characters in the first string, add the remaining letters from the second one. If you run out of characters in the second word, then fill the result string by the remaining characters from the first word.

You need to read two strings from input and combine them with an iterator. Print the resulting string.

Sample Input 1:

cat
dog

Sample Output 1:

cdaotg

Sample Input 2:

cat
hyperskill

Sample Output 2:

chaytperskill
Write a program in Kotlin
fun main() {
// write your code
}
___

Create a free account to access the full topic