0
What i am doing wrong
fun shippingCost(amount: Double, international: Boolean): Double { var envio=0.0 if(amount >=75 && international==false){ envio=0.0 } else if(amount<75 && international==false){ envio=(amount *10/100) } else if (amount *0.15 >50 && international == true){ envio = 50 } else { envio =amount *0.15 } return envio } fun main(args: Array<String>) { val total = readLine()!!.toDouble() val international = readLine()!!.toBoolean() println(shippingCost(total, international)) }
6 Answers
+ 1
That's what the test cases say? Or are you trying to manually test yourself?
If it'd the latter, make sure you put each input on two separate lines when you're prompted.
For example:
60.00
500.00
0
For orders in the United States: - $75+ orders have free shipping - Orders under $75 have shipping costs of 10% of the total amount of the order. 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.
0
That Is not helping me
0
What is the error that you are running into?
0
unhandled exection:
imput string was not in a corret format
0
Thanks š yes I am trying to manually test myself