0
I cant get the correct output for this in kotlin
fun shippingCost(amount: Double, international: Boolean): Double{ val amount: Double= readLine()!! println("The amount is: $amount") val international =true val total: Double= when{ amount>=75.0&&international==false->amount amount<75.0&&international==false->10/100*amount+amount international==false->15/100*amount+amount else-> 0.0 } return (total) } fun main(args: Array<String>) { val total = readLine()!!.toDouble() val international = readLine()!!.toBoolean() println(shippingCost(total, international)) }
1 Odpowiedź
+ 3
What is the reason for lines 3,4&5?
Also, please double check that your conditions are matched with the given task.