Kotlin Program to Generate Multiplication Table

Kotlin Program to Generate Multiplication Table: In this program, you’ll learn about how to generate the multiplication table of a given number. This is done by using a for and a while loop in Kotlin.

Kotlin Program to Generate Multiplication Table

Source Code

fun main(args: Array<String>) {
    val num = 5

    for (i in 1..10) {
        val product = num * i
        println("$num * $i = $product")
    }
}

Output