0
Why 3 test in Kotlin 25 gave me a error?
fun shippingCost(amount: Double, international: Boolean): Double { if(international == false && amount >= 75){ return (amount % amount) } if(international == false && amount < 75){ return (amount * 10 / 100) } else{ return (amount * 15 / 100) } } fun main(args: Array<String>) { val total = readLine()!!.toDouble() val international = readLine()!!.toBoolean() println(shippingCost(total, international)) }
1 ответ
+ 1
For international orders, there is a 15% shipping fee, with a maximum of $50. This means that the maximum shipping fee for an international order is $50.
So, you should return 50.0 if amount *0.15 is greater than 50$.