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)) }

22nd Jul 2022, 3:38 PM
ANDRES PENA
ANDRES PENA - avatar
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
22nd Jul 2022, 3:55 PM
Justice
Justice - avatar
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.
22nd Jul 2022, 3:40 PM
ANDRES PENA
ANDRES PENA - avatar
0
That Is not helping me
22nd Jul 2022, 3:42 PM
ANDRES PENA
ANDRES PENA - avatar
0
What is the error that you are running into?
22nd Jul 2022, 3:47 PM
Justice
Justice - avatar
0
unhandled exection: imput string was not in a corret format
22nd Jul 2022, 3:51 PM
ANDRES PENA
ANDRES PENA - avatar
0
Thanks šŸ’– yes I am trying to manually test myself
22nd Jul 2022, 4:28 PM
ANDRES PENA
ANDRES PENA - avatar