Create a function called getVolume, which takes 3 Int arguments that are supposed to be the length, the width, and the height of an object, and returns the volume of the cuboid with these sides. If the third or the second dimension is not specified, it should be 1 by default.
Default arguments
Calculate volume
Report a typo
Write a program in Kotlin
fun getVolume(...){
//TODO
}
___
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.