0
Everything what is needed, i did! But still 1 test case is getting failed! What's wrong?
fun shippingCost(amount: Double, international: Boolean): Double { var result = 0.0 if(amount > 75 && international == false){ result = 0.0 } else if (amount < 75 && international==false){ result += amount * .1 } else if(international==true && amount > 75){ result = amount * .15 } return result } fun main(args: Array<String>) { val total = readLine()!!.toDouble() val international = readLine()!!.toBoolean() println(shippingCost(total, international)) }
4 Antworten
+ 2
Read the description :
"... For international orders, there is a 15% shipping fee, with a maximum of $50..."
There is something missing in your code.
+ 1
No, not 50%.
For International Transport:
Shipping fee is 15% for ALL Orders, but the shipping fee should NEVER be greater than 50.00 Dollar.
0
Set a condition for international as true and amount<75
0
But it is not given that when will it be 50% Coding Cat