Write a function named reverse that reverses a given Int value. If the given Int is null, then return -1.
Type system
Reverse me if you can
Report a typo
Sample Input 1:
654Sample Output 1:
456Write a program in Kotlin
fun reverse(input: Int?): Int {
return 0
}
___
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.