i dont understand why the output is diffrent
so i was working on the Kotlin parking fee code challenge at the end of control flow and i am not understanding why calculateFee outputs correct number but the calculateFeeSecond outputs wrong number can someone please help me understand Thanks here is the code below fun calculateFee() { var hours = readLine()!!.toInt() var total: Double = 0.0 if(hours <= 5) { total = hours * 1.0 } else if(hours > 5 && hours < 24) { total = 5 + ((hours - 5) * 0.5) } else if(hours > 24) { total = 15 * (hours / 24) + 0.5 * (hours % 24) } println(total) } fun calculateFeeSecond() { var hours = readLine()!!.toInt() var total: Double = 0.0 if(hours in 1..100) { if(hours == 5) { total = hours.toDouble() * 1 } else if(hours > 5 && hours < 24) { total = 5 + ((hours.toDouble() - 5) * .5) } else { total = (hours / 24 * 15) + (0.5 * hours % 24) } } println(total)