Look at the code below: the program for determining whether the word passed through the arguments is a palindrome is almost ready. Your task is to complete the code for the program to work correctly.
Introduction to kotlinx-cli
Is it a palindrome?
Report a typo
Write a program in Kotlin
import kotlinx.cli.*
fun checkWords(args: Array<String>){
// make your code here
if (text == text.reversed()) {
println("$text is a palindrome")
} else {
println("$text is not a palindrome")
}
}
___
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.