Write a function that throws an exception with the message It's too big if a value is greater than zero; otherwise, it should return the value.
Taming exceptions
Too big for us
Report a typo
Sample Input 1:
-1Sample Output 1:
-1Write a program in Kotlin
fun returnValue(): Int {
val value = readln().toInt()
// write your code here
}
___
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.