Kotlin Shipping Calculator
I am having trouble producing an output in the terminal. Can someone tell me what is wrong with my code? The parameters are that orders that are over $75 have free shipping. Orders less than $75 have a 10% fee to the total amount. There is an international fee of 15% with the maximum fee of $50. The two inputs are a double and bolean. Where I am having trouble is the output. I do not know what is wrong with the code; in the terminal it says "no output." Please help. fun main(args: Array<String>) { fun shippingCost(amount: Double, international: Boolean): Double { if (international == false && amount > 75) { println(amount + 0.0) } else if (international == false && amount < 75) { return (amount * 0.10) } else if (international == true && amount < 333.3334) { return (amount * 0.15) } else { return (amount + 50.0) } val total = readLine()!!.toDouble() val international = readLine()!!.toBoolean() println(shippingCost(total, international)) return(shippingCost(total, international)) } }