[SOLVED] Emm Wtf??? What's wrong??
fun shippingCost(amount: Double, international: Boolean): Double { var x = 0 when { international == true && amount.toInt() <= 50 -> var x = amount.toInt() * 15 / 100 international == false && amount.toInt() < 75 -> var x = amount.toInt() * 10 / 100 international == false && amount.toInt() >= 75 -> var x = amount international == true && amount.toInt() > 50 -> println("Invalid") } return (amount + x).toDouble() } fun main(args: Array<String>) { val total = readLine()!!.toDouble() val international = readLine()!!.toBoolean() println(shippingCost(total, international)) } It supose I must find the price of the orders, with a 10% for import add to total price, that's for < 75$ and 75+ is for free, so that's no international, in case to be international, the import is 15% with a max of 50$