Kotlin Program to Multiply two Floating-Point Numbers

Kotlin Program to Multiply two Floating-Point Numbers: In the above program Kotlin Program to Multiply two Floating-Point Numbers, we have two floating-point numbers 1.5f and 2.0f stored in variables first and second respectively.

Kotlin Program to Multiply two Floating-Point Numbers

Source Code

fun main(args: Array<String>) {

    val first = 1.5f
    val second = 2.0f

    val product = first * second

    println("The product is: $product")
}

Output