Single Expression Function - Example

fun main(){
println(convertToFahrenheit(degree = 100.0000000))
}

fun convertToFahrenheit(degree : Double) = (degree * 9 / 5) + 32
Result

212.0

Comments

Popular Posts